[Filesystem] Fix and complete the API

Implement the spec.
Fix and pass the TCT tests.
Fix and complete the example.

BUG=XWALK-1071
BUG=XWALK-1827
3-space indent seems weird here, suggest to use 2-space indent for the whole file.