On Wednesday, October 23, 2002, at 10:27 AM, David Ligon wrote:
Is there a clean way to detect and follow(or not) aliases in C? I've
noticed stat and lstat appear to return a regular file with 0 st_size
with > 0 st_blocks, but with a unique inode. I have not been able to
find any other system functions that would return this information. I
tried the FileManager "fileAttributesAtPath: traverseLink:" method,
but this appears to return the same information as stat/lstat, and I
would prefer to stay with as much standard UNIX C file I/O as
possible. I've also been unable to find clear documentation on
specifics of how aliases are implemented other than overviews such as
"aliases have a similar purpose, but are different from symbolic
links..." I'm sure there are hundreds of developers out there that
have had to figure this out already.
The UNIX layer knows nothing about Aliases. You will be using Carbon
functions to resolve aliases, period. Aliases exist on no other
platform so i don't see why you would want to use standard UNIX file
functions here, it won't be portable anyway.
You only need them for resolving the alias, you can later convert the
FSSpec/FSRef to a hard path to use with the unix I/O functions.
-Ben
_______________________________________________
unix-porting mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/unix-porting
Do not post admin requests to the list. They will be ignored.