delorie.com/djgpp/doc/libc/libc_492.html
|
search
|
libc.a reference
_invent_inode
Syntax
| ino_t
_invent_inode(const char *name, unsigned time_stamp,
unsigned long fsize)
|
Description
This invents an inode number for those files which don't have valid DOS
cluster number. These could be:
-
devices like `/dev/null' or file system extensions
(see section File System Extensions)
-
empty files which were not allocated disk space yet
-
or files on networked drives, for which the redirector doesn't bring the
cluster number.
To ensure proper operation of this function, you must call it with a filename
in some canonical form. E.g., with a name returned by truename()
(see section _truename), or that returned by _fixpath()
(see section _fixpath).
The point here is that the entire program must abide by these
conventions through its operation, or else you risk getting different inode
numbers for the same file.
Return Value
0 on error, otherwise the invented inode number for the file.
Portability