How could I get the size in bytes of a partition by it’s device name (e.g. /dev/disk0s1) in a Cocoa application? Maybe I should use Disk Arbitration framework somehow?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You’re right — you can get that information by using the Disk Arbitration framework:
Note that /dev/disk0s1 is the EFI partition.