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: Wed, 10 Jun 2009 01:02:09 -0700
For non-regular files, the filesystem is less willing to store the
information you are trying to set.
-- Terry
On Jun 9, 2009, at 9:22 PM, rohan a <email@hidden> wrote:
Hi Terry,
Thanks for the reply. However, I am using the HFS+
file-system. This supports all the attributes that I was trying to set
to the object.
Thanks
On Wed, Jun 10, 2009 at 7:30 AM, Terry Lambert<email@hidden>
wrote:
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