[asterisk-dev] Globally, persistently identifying a file

Tilghman Lesher tilghman at meg.abyt.es
Fri Apr 27 17:44:07 CDT 2012


On Fri, Apr 27, 2012 at 3:52 PM, Nick Zitzmann <nick at chronosnet.com> wrote:
> On Apr 27, 2012, at 12:06 PM, Tilghman Lesher wrote:
>
>> Here's another idea:  instead of relying upon the file's inode, use
>> the containing directory's inode number and a combination of the inode
>> number and the name of the file.  It will work fine if the Cocoa API
>> deletes and recreates the file.  It will also work fine if the
>> containing directory is moved to another part of the filesystem.  If
>> either the filename or the inode don't match, you can use that
>> information to update your database on each run.  This especially
>> works well with applications, since applications are themselves
>> directories.
>
> And that will stop working once the file name changes.

Only if the inode number changes at the same time.

-Tilghman



More information about the asterisk-dev mailing list