Does a system call or library exist that would allow my C++ code to use hdiutil on Mac OS X. My code needs to mount an available .dmg file and then manipulate what's inside.
C++ interface for hdiutil on Mac
chdiutilmacos
Related Topic
- Macos – Who is listening on a given TCP port on Mac OS X
- C++ – What are the basic rules and idioms for operator overloading
- C++ – What does T&& (double ampersand) mean in C++11
- C++11 introduced a standardized memory model. What does it mean? And how is it going to affect C++ programming
- Python – Why is reading lines from stdin much slower in C++ than Python
- C++ – Image Processing: Algorithm Improvement for ‘Coca-Cola Can’ Recognition
- Java – Where is Java Installed on Mac OS X
- Java – How to install Java 8 on Mac
Best Answer
If you can use Objective-C++, you can use NSTask to run command line tools:
If you need to use "plain" C++, you can use system():
or fork()/exec().
You'll need to double-check whether
hdiutil
actually returns 0 for success or not.