简体   繁体   中英

NSFileHandle for binary files?

How can we read executable files in memory and then manipulate them , does NSFileHandle can works with executable files and how so ?! Thank you.

Sure, NSFileHandle can manipulate anything you can read and write with a file descriptor. It just gives you raw access to the data in the file though, so to work with executables you would need to implement things like a Mach-O parser if you want to actually do anything that requires you to do anything that requires semantic understanding of the file,

On the other hand, if you just want to do something like checksum the file you don't need much more infrastructure than NSFileHandle.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM