wix-incubator / kissfs

Extensible and reactive text-based file-system library that keeps it simple, universal and cross-platform
MIT License
12 stars 5 forks source link

add version to filesystem nodes #100

Open amir-arad opened 6 years ago

amir-arad commented 6 years ago

version field of type number should be added to the File, Directory, and ShallowDirectory types. No special additions in the API.

The value of the version is a number that increases whenever the content of the filesystem node changed. The value may differ between filesystem implementations and between nodes in the same file system (can be a version counter, a timestamp etc.).

In LocalFileSystem the ctime Stat Time Value of the underlying file can be a valid implementation for a version field, in InMemoryFileSystem it could be simply a version counter.