I'm working on some archiving programs and need to (for various reasons) keep track of a very large number of files so that I can revisit them at the end of the operation. For example, on extract, I need to set directory access times and permissions after the complete extract is finished, which requires me to record every created directory. (No, there is no way around this short of re-scanning the entire archive a second time, which is impractical at best.)
Right now, I'm storing the full pathname of each such file, but that is taking up a lot of memory, so I'm looking for a more compact approach. It occurred to me that the device number/inode (as returned by stat(2)) is another way to uniquely identify a file. As it turns out, I need to stat() everything anyway, so collecting such identifiers is easy. But, I can't find any system calls that actually use this information.
Question: Are there any system calls that allow you to access/modify a file based only on the device number/inode number?
Tim Kientzle
_______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"