Raymond Ho schrieb:
I try to change the attribute of file in SD card but fail. Here is my code :

err = VFSFileOpen(volRefNum, kExpansionKeyPathFilename, vfsModeReadWrite,
&ref);
err = VFSFileGetAttributes(ref, &value);
value = value|vfsFileAttrHidden|vfsFileAttrSystem;
From the Palm OS Reference of VFSFileSetAttributes() note:
"This function may fail when
setting other attributes, depending on the underlying file system."

In your example, vfsFileAttrSystem is really not allowed on most driver implementations. vfsFileAttrArchive should work on all.

In my experiences, many attributes (including vfsFileAttrReadOnly) cannot changed based upon the the underlying file system driver. They are a couple of vendors (expansion card manufacturers) out there, e.g.
compact flash cards ect.

regards,

ps: It is also not allow to change these attributes during HotSync (Conduit Manager API)


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

Reply via email to