Quite simply, how do I remove x amount of bytes, or a string from (the end of) a file..? I know how to append bytes — I need to do the opposite.
Unfortunately I haven’t found any examples of how to do this :-/
NSFileHandle* fh = [NSFileHandle fileHandleForUpdatingAtPath: path];
[fh seekToEndOfFile];
??
NSFileHandlehas atruncateFileAtOffsetmethod that does exactly what you want.