c - Assign unique numbers to File during runtime -


i want assign unique file numbers files during run time.

  1. creating hash file name not option me not want collisions.

  2. one option create running numbers files. not have access source file walk directory in place running binary.

so need option can extract file name binary (say using symbol table similar gdb). not sure how that. appriciated

you try use inode number (st_ino) file -- using fstat (http://linux.die.net/man/2/fstat).

the inode number how file system keeping track of files, , unique given file system -- hence long files not located on different files systems (different mount points) inode number unique.

this include if there multiple links same file, if worries well.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -