Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Aug 2003 19:54:45 -0700
From:      Tim Kientzle <kientzle@acm.org>
To:        freebsd-hackers@FreeBSD.ORG
Subject:   Inode Operations
Message-ID:  <3F4828F5.8090207@acm.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3F4828F5.8090207>