반응형

    NSFileHandle *file;
    NSMutableData *data;
   
    const char *bytestring = "black dog";
    data = [NSMutableData dataWithBytes:bytestring length:strlen(bytestring)];
   
    file = [NSFileHandle fileHandleForUpdatingAtPath:@"filePath"];
   
    if (file == nil)
    {
        NSLog(@"Failed to open file");
    }
   
    [file seekToFileOffset:10];
    [file writeData:data];
   
    [file closeFile];

반응형
Posted by 컴스터
,