Re: setattrlist() on FIFO files, sockets, character and block device files
Re: setattrlist() on FIFO files, sockets, character and block device files
- Subject: Re: setattrlist() on FIFO files, sockets, character and block device files
- From: Terry Lambert <email@hidden>
- Date: Tue, 9 Jun 2009 19:00:01 -0700
On Jun 7, 2009, at 11:39 PM, rohan a wrote:
Hello All,
A setattrlist() call on a FIFO file, socket and
character/block device file fails with errno=0 (unknown error)?
Why does setattrlist() not work with these files?Also why does it not
return a proper errno?
I am trying to set the following attributes:
BSD flags
creation time
text encoding hint
backup time
&
finder flags
The same works with all other files.
Another interesting thing here is that getattrlist() works fine with
these file types
The setattrlist() API sets attributes on file system objects; you can
only set the information about the object that the backing filesystem
is willing to actually store; if you attempt to set more than that,
you'll get an error. The getattrlist() API gets attributes from
filesystem objects; minimally, it will return the same information
that fstat() would return to you; if the backing FS supports more than
that, and the information exists, and you request it, it will return
more than that. What's supported is on a filesystem by filesystem
basis, and is noted in the FS volume attributes for the volume in
question.
Typically I recommend that you use Coca frameworks, rather than
calling these APIs directly from your code, since it's very easy to
make mistakes packing or unpacking the information.
-- Terry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden