At 10:51 AM 4/25/2005, you wrote:
> This isn't used for FAT.

It certainly *is* used under HostFS. When I am scanning the card, I need to check whether the directory entry I've found is a directory or a file. Checking whether it is a directory is easy:

if (fileInfo.attributes & vfsFileAttrDirectory)

So, I thought, if it is not a directory, let's check whether it anything *but* a link:

else if (fileInfo.attributes & (vfsFileAttrReadOnly | vfsFileAttrHidden | vfsFileAttrSystem | vfsFileAttrArchive))

and then spend two hours trying to figure out why I wasn't finding any files. :-( Turned out, *all* files on the memory card similated via HostFS had the vfsFileAttrLink attribute set and nothing else. So, in order to find them, I had to drop the whole "else if" clause and replace it with a simple "else". In other words - if it's not a directory, then assume that it's a file.

This either is a bug in HostFS (which isn't implementing FAT, but is implementing a connection to the host file system), or it's a design decision, made because all of the "files" in HostFS are links to the host's file system. I don't know the code so I can't say what it was.



-- Ben Combee, Senior Software Engineer, palmOne, Inc. "Combee on Palm OS" weblog: http://palmos.combee.net/ Developer Forum Archives: http://news.palmos.com/read/all_forums/


-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/

Reply via email to