On Dec 3, 4:04 pm, "ted bonkenburg" <[EMAIL PROTECTED]> wrote:
> On Wed, Dec 3, 2008 at 11:56 AM, Jason8 <[EMAIL PROTECTED]> wrote:
>
> > Hi:
>
> > In createFileAtPath I'd like to know the size of the file I'm
> > creating, or in writeFileAtPath the size of the file I'm writing. Is
> > it possible to get this information in either of these delegates?
>
> No. At the BSD layer, when you create a file and starting appending
> data to it you don't inform the operating system how big the file will
> eventually be. Since MacFUSE is really implementing a file system, it
> is bound to the same BSD/POSIX model.
>
For my particular file system, it would be valuable to have knowledge
of the source file; I need the size as a parameter inside my
implementation of createFileAtPath. Maybe I'll need to add this into
fuse so I can expose the path of the file on the local mac and use an
NSFileManager to learn about it. When a user drags a file into my file
system and createFileAtPath is triggered, does fuse have any knowledge
of this file like the path for example? Or does the finder just
provide a raw stream of data?
Here's a good example of why this would be handy: If the capacity of
the file system is not known, and I copy 100G of data to it, only to
find out I have 99.99G available and it fails after 15h of copying.
But if in createFileAtPath (or writeFileAtPath) I know my size of my
file I can save the user allot of time by raising an exception early.
J.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---