Re: Generic creation of a symblic link
Re: Generic creation of a symblic link
- Subject: Re: Generic creation of a symblic link
- From: websrvr <email@hidden>
- Date: Thu, 11 Oct 2012 19:11:36 -0400
- Mta-interface: amavisd-new-2.3.3 (2005-08-22) + Maia Mailguard 1.0.1 at daleenterprise.com
Try having a look at the following code if you want to see a working
example.
http://www.opensource.apple.com/source/file_cmds/file_cmds-212.1/ln/ln.c
-- Dale
On Oct 11, 2012, at 18:33 PM, James Bucanek wrote:
Greetings,
I want to use the BSD API to create an empty symbolic link file and
then write its contents. There's no obvious way of doing this with
open(), as the object type flags in the mode parameter appear to be
ignored.
I would *assume* that the generic way of creating a symbolic link
file would be to use a function like mknod() to create an arbitrary
filesystem object (of type S_IFLNK), and then open() (using
O_SYMLINK) the newly created symlink file and write its content.
I tried to research this by finding out how the symbolic link
creation function symlink() is implemented ... but I can't seem to
find its source code. I've grep'd the entire Libc-825.25 folder
from the latest Darwin release. I can see where other functions
call it, but not where it's implemented.
--
James Bucanek
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40macftphttp.serverbox.org
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden