Hi

Thanks for the tips Ted. Was successfully able to create a read-only
file system with all the files opening and showing up properly.
Now I'm trying to make it a read-write. For starters, I'm setting a
511 posix permission for all files and have implemented the
createDirectoryAtPath, createFileAtPath and copyItemAtPath methods.
But when I try to copy a file in another directory of the same file
system it gives a prompt for insufficient permissions and copying a
file from the FS to a local directory does a copy operation after
which the copied file just disappears!
Do I need to do anything more than setting permission as 511 and
implementing the above said methods for doing a copy?

On Nov 18, 10:22 pm, "ted bonkenburg" <[EMAIL PROTECTED]> wrote:
> On Tue, Nov 18, 2008 at 5:00 AM, iDeveloper <[EMAIL PROTECTED]> wrote:
>
> > Hi.
>
> > I was finally able to display the contents in the root. Can someone
> > please tell me if contentsOfDirectoryAtPath is/should be called
> > everytime a user clicks on an item marked as a Directory? Or rather,
> > when is it called?
> > If I have multiple directories and I want to get their contents only
> > after the user double-clicks on one of them, how should I implement
> > contentsOfDirectoryAtPath and attributesOfItemAtPath? What is the
> > order in which they are called?
>
> MacFUSE is not a Finder plugin; you are implementing a real file
> system, so you need to think beyond the Finder. Your
> contentsOfDirectoryAtPath: will be called frequently. You may see
> accesses to files in a directory when there was no
> contentsOfDirectoryAtPath: call. There is no strict order on when
> these will be called. The Finder, other applications, and even parts
> of the OS that would would not expect may be requesting directory
> contents or file attributes on your file system at any time. They will
> even do this for files and directories that don't exist.
>
> If you mount your file system with the "debug" option then the fuse
> library will spit out messages that correspond with file system
> operations as they occur. That can be somewhat useful.
>
> When writing a file system, I typically start off by avoiding the
> Finder and using the Terminal to navigate my file system until I get
> that working perfectly. Basically, you want to start off by getting
> simple commands like:
>
> ls <path_on_your_fs>
> ls -l <path_on_your_fs>
> stat <path_on_your_fs>
> cat <path_to_file_on_your_fs>
>
> If you debug and get these basic operations working well then you can
> start trying to work well with the Finder. Working well with the
> Finder is not an easy task; the Finder has all sorts of interesting
> file access patterns and is very picky that your file system is
> returning the proper errors and behaving as much like a "standard"
> file system as possible. This is much easier to do for a read-only
> file system, so that is usually the best way to start.
>
> Best of luck!
>
> ted
>
>
>
> > On Nov 18, 2:01 pm, iDeveloper <[EMAIL PROTECTED]> wrote:
> >> Hi Ted
>
> >> I added the ro option back. The ytfs example creates an empty
> >> dictionary for nodes that exist in the videos_ dictionary. Shouldn't
> >> we be returning attributes specified in the .h file (File type, size
> >> etc)
> >> Can you please point me to an example/documentation which explains the
> >> methods and their implementation in detail.
> >> The GMUserFIleSystem specifies pretty much all the documentation. But
> >> an example implementing this might be helpful. I tried running the
> >> LoopbackFS example. But as soon as I select a directory, it gives an
> >> alert saying
>
> >> Internal fuse error (rc=1) while attempting to mount the file system.
> >> For now, the best way to diagnose is to look for error messages using
> >> Console.
> >> mount_fusefs: failed to mount /Volumes/loop@/dev/fuse0: Socket is not
> >> connected
>
> >> And thats where I'm stuck!
>
> >> On Nov 18, 1:12 pm, "ted bonkenburg" <[EMAIL PROTECTED]> wrote:
>
> >> > On Mon, Nov 17, 2008 at 10:44 PM, iDeveloper <[EMAIL PROTECTED]> wrote:
>
> >> > > Hi Ted
>
> >> > > Thanks for the quick response. YTFS works fine. There is no problem
> >> > > with running that example. I've just modified it at some places, like
> >> > > removing the ro option, returning my icns file from iconDataAtPath and
> >> > > returning an array with the folder names in my directory. I've not
> >> > > made any other changes to the code.
>
> >> > It is good to hear that ytfs is working for you.
>
> >> > > Removed the ro option as I wanted it to be a read-write system.
>
> >> > If you want to create a write-able file system then you really need to
> >> > properly implement almost all of the GMUserFileSystemOperations
> >> > informal protocol methods. In addition, you'll need to be thorough and
> >> > make sure that your operations behave properly by returning proper
> >> > errors, filling in a complete set of attributes in
> >> > attributesOfItemAtPath:, etc.
>
> >> > For this reason, I suggest you get your file system working well in
> >> > read-only mode before you tackle write support.
>
> >> > ted
>
> >> > > Thanks again
>
> >> > > On Nov 18, 9:12 am, "ted bonkenburg" <[EMAIL PROTECTED]> wrote:
> >> > >> On Mon, Nov 17, 2008 at 8:13 AM, iDeveloper <[EMAIL PROTECTED]> wrote:
>
> >> > >> > Hi
>
> >> > >> > I'm trying to create a file system using the ytfs example as the 
> >> > >> > base.
> >> > >> > But nothing seems to be working with my code! The icns file doesn't
>
> >> > >> Did you get ytfs working? If not, did you follow the tutorial exactly?
> >> > >> Specifically, did you follow the part that recommended that you check
> >> > >> out the 1.5 tag for the YTFS example?
>
> >> > >> svn 
> >> > >> checkouthttp://macfuse.googlecode.com/svn/tags/macfuse-1.5/filesystems-objc/y...
> >> > >> ytfs
>
> >> > >> The head ytfs-tutorial is updated to reflect changes to the
> >> > >> Objective-C API that may be in the next MacFUSE release.
>
> >> > >> > show up, the file system doesn't dismount on stopping the project 
> >> > >> > and
> >> > >> > I can't see any of the files in my directory :(
>
> >> > >> Ok, these are a lot of problems at once. I'll wait until I hear if you
> >> > >> got ytfs working as it is supposed to work first.
>
> >> > >> > I am getting files from a web-service, have removed the ro option 
> >> > >> > and
> >> > >> > returning attribute dictionary for both root dir and files. But I
>
> >> > >> Removing the "ro" option is not a good idea until
>
> >> > >> > still don;t see anything in the root dir! And if I try to import
> >> > >> > MacFUSE.h instead of GMUserFileSystem.h, I get an error "No such 
> >> > >> > file
> >> > >> > or directory"
> >> > >> > I am using MacFUSE 1.7. I've included the MacFUSE.framework file in
> >> > >> > the project but I don't see a MacFUSE.h in the headers!
>
> >> > >> MacFUSE.h is not present in 1.7. It is new and should be present in
> >> > >> the next release of MacFUSE.
>
> >> > >> It sounds to me like maybe you have checked out the current
> >> > >> development tree rather than a 1.5 or 1.7 tag, which will work better
> >> > >> when working off one of the example Objective-C file systems.
>
> >> > >> If you want to be forward-thinking in your work, then you can develop
> >> > >> against (and help test) the developer releases. If so, then please
> >> > >> read:
>
> >> > >>http://code.google.com/p/macfuse/wiki/AUTOINSTALL
>
> >> > >> ted
>
> >> > >> > Please help!
--~--~---------~--~----~------------~-------~--~----~
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