jvilk / BrowserFS

BrowserFS is an in-browser filesystem that emulates the Node JS filesystem API and supports storing and retrieving files from various backends.
Other
3.07k stars 218 forks source link

Add generic properties support to `PreloadFile` #17

Closed jvilk closed 11 years ago

jvilk commented 11 years ago

PreloadFile should have a generic implementation for property-related functions, like chmod.

Since PreloadFile has a reference to the file system that created it, these implementations should be guarded with:

unless @_fs.supportsProps()
  cb new BrowserFS.ApiError BrowserFS.ApiError.NOT_SUPPORTED
perimosocordiae commented 11 years ago

See commit 17e5d3467e1b4fa1088bcc0c61bdf8d1fba6b593 for an example (chmod).

jvilk commented 11 years ago

chmod is defined in PreloadFile, and chown is defined through individual file systems.

We'll want to revisit this when we find an application that will actually need use of these properties to ensure that we're "doing the right thing".