Sunday 2 April 2017

Is there any way to retrieve a file / folder's unique ID via NodeJS?

The problem I face is simple. I want to keep track of the file/folder even after it has been renamed / deleted etc? Does NodeJS provide a way to access this information a file? I've tried the default file system module fs.stats() : https://nodejs.org/api/fs.html#fs_class_fs_stats . Unfortunately, it does not seem to provide such unique ID referencing for a particular file.

Does there exist such a solution in NodeJS?

Note: I DO NOT want to generate a Unique ID for a file. It's pretty easy to assign a random string to a file and associate the string with this this. But it's the other way around. I want to associate a file with a system wide string of some sort.

Any help is appreciated.



via Sai Krishna Deep

No comments:

Post a Comment