On Fri, Dec 5, 2008 at 8:52 AM, iDeveloper <[EMAIL PROTECTED]> wrote:
>
> Hi Ted
>
> I implemented setAttributes like you told me to. Not returning a YES
> for everything now without checking.

I'm not sure what you mean by checking. You should be setting the
requested attributes on the files in your file system.

>
> I still cannot save files edited using vi or TextEdit.
> But if I drag-drop files, the file is getting created at the server to
> which I can later append the data. How can I get the contents of the
> file which was dragged into the FS?

When you copy a file into your file system you should see a create
operation followed by a series of writes.

The "Save As" procedure for a file within your file system can be
somewhat complicated. See:

See http://groups.google.com/group/macfuse/msg/46c6c4012ec339c3

ted

>
> Thanks again for all your help.
>
> On Dec 3, 8:25 pm, iDeveloper <[EMAIL PROTECTED]> wrote:
>> Hi Ted
>>
>> I still don't really get it. Do I check what attributes are coming in
>> as arguments and change them before returning a value?
>>
>> I'm using version 1.7
>>
>> On Dec 2, 3:33 am, "ted bonkenburg" <[EMAIL PROTECTED]> wrote:
>>
>> > On Mon, Dec 1, 2008 at 8:00 AM, iDeveloper <[EMAIL PROTECTED]> wrote:
>>
>> > > Hi Ted
>>
>> > > I got the read to work along with copying files from the FS to the
>> > > local file system, both through Finder and the command line.
>>
>> > Great.
>>
>> > > I have implemented the setAttributes:ofItemAtPath method, but I
>> > > noticed it is only called once or twice and that too for files created
>> > > by finder.
>>
>> > Yes, this won't be called that often. It is called when something is
>> > updating an attribute of your file, for example 'chmod', 'chown',
>> > 'utimes', etc. If you are using the developer release of MacFUSE then
>> > you will see that it is also called when the file is 'truncated'.
>>
>> > > What should I have in setAttributes? Aren't we setting the attributes
>> > > for files in attributesOfItemAtPath. At present I'm just returning a
>> > > YES in setAttributes
>>
>> > Think of it this way. In attributesOfItemAtPath you are reporting on
>> > the attributes of a file or directory. This is a "read" operation. The
>> > system is reading what the current attributes for the file are. With
>> > setAttributes you are setting the attirbutes of a file or directory in
>> > your file system. This is a "write" operation. The system is setting
>> > something about your file, and so your file system needs to update the
>> > file accordingly.
>>
>> > Returning YES without doing anything else is claiming that you are
>> > updating the file when you actually aren't. It is recommended that you
>> > actually see what attributes are being set and update your files as
>> > necessary. In some cases it does work to satisfy the Finder to just
>> > return YES, but this can lead to strange issues down the road that are
>> > hard to debug. Think of it as 'chmod' claiming success but not
>> > actually chmod'ing the file.
>>
>> > > What should be my next step for implementing the write function?
>>
>> > It would be a good idea to implement setAttributes fully, as described 
>> > above.
>>
>> > What version of MacFUSE are you targeting?
>>
>> > ted
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MacFUSE" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/macfuse?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to