falood/file_system

Unify events from backends

mveytsman opened this issue · 1 comments

Longterm goal: it would be nice to define a consistent API from all the backends.

https://docs.google.com/document/d/1-GQrFdDVrA57-ce0kbzSth4lQqfOMMRKpih3hPJmvoU/edit might be a good starting place for research.

/cc @whitfin

now we have a file event provider with default events.
when I modify a file /tmp/fs/test I got such messages after save the file in vim:

{:file_event, #PID<0.221.0>, {"/private/tmp/fs/.test.swpx", [:created, :removed]}}
{:file_event, #PID<0.221.0>, {"/private/tmp/fs/.test.swp", [:created, :removed, :changeowner]}}
{:file_event, #PID<0.221.0>, {"/private/tmp/fs/25454", [:created, :removed, :changeowner]}}
{:file_event, #PID<0.221.0>, {"/private/tmp/fs/test",  [:created, :inodemetamod, :renamed, :modified, :changeowner]}}
{:file_event, #PID<0.221.0>, {"/private/tmp/fs/test~", [:removed, :renamed]}}
{:file_event, #PID<0.221.0>, {"/private/tmp/fs/.test.swp", [:created, :removed, :modified, :changeowner]}}

This test is run under macos, I'm sure there will be different in other os.
is it necessary to make a middle to make sure the same result returned for all backends and all os?