os-js / osjs-client

OS.js Client Module
https://manual.os-js.org/
Other
31 stars 32 forks source link

Add support for client-side VFS watch events #57

Open andersevenrud opened 5 years ago

andersevenrud commented 5 years ago

When a filesystem cannot be watched by the server, the client should emit these events.

The server already emits the following event when a filesystem is set to watch (and the adapter can support this):

osjs/vfs:watch:change
{
  source: 'server',
  path: 'mount:/path/to/directory',
  action: 'unlinkDir',
  type: 'remove'
}

This is the event action/type map:

Action Type
add add
addDir add
unlink remove
unlinkDir remove
andersevenrud commented 5 years ago

Related: https://github.com/os-js/osjs-server/issues/12