Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
cocoa フレームワークまたはカーボンを使用して USB フラッシュ ドライブをフォーマットするにはどうすればよいですか? それを作る機能はありますか?
NSTaskを介してdiskutilを使用できます。タスクを承認する必要がある場合があります。
Mac でターミナルを開く
以下のコマンドを使用してディスクのリストを取得します
$ diskutil リスト
USBドライブの名前をメモして、以下のコマンドを入力してください
$ sudo diskutil eraseDisk FAT32 DISK2 MBRFormat /dev/disk2
注:FAT32の後に大文字でのみディスク名を入力する必要があります(私のものはDISK2です)