我需要在 iOS 下以编程方式创建一个特定长度的虚拟 .m4a 文件...
try this
NSError *error = nil;
path = [path stringByAppendingPathComponent:@"tempfile"];
NSURL *URL = [NSURL fileURLWithPath:path];
[[NSFileManager defaultManager]createFileAtPath:path contents:nil attributes:nil]
NSFileHandle *writeFile = [NSFileHandle fileHandleForWritingToURL:URL error:&error];
[writeFile truncateFileAtOffset:4000000000*sizeof(Byte)];
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)