Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to write a file to a USB flash memory stick?



Hi Ben,

hmmmmmmm.... well why don't you just open the file the "normal" way ( with open( "/Volumes/Volume_name/test.txt", "" )? You can get the Volume name with PBGetVolumeInfo ( or a similiar command, or you just know the volume name and don't change it ). If you really need to open it over the block device then you need to be root. And i'd rather not play around with the block files in root, because you might, by mistake, write to the wrong block device ( startup hard drive ) and this would result in data loss. If you really want to do it though then try /dev/disk1s1 and read in blocks ( i assume 512 bytes ).

Fabian
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/usb/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.