저는 초보 개발자입니다. 이 오류로 인해 멈췄습니다.Clang LLVM 1.0 오류 objective-c
Clang LLVM 1.0 Error
Expected ':'
line: [pipe fileHandleForReading availableData]
아무도 도와 줄 수 있습니까? 미리 감사드립니다.
- (NSInteger)sizeOfItemAtPath:(NSString*)path {
BOOL isdir;
[[NSFileManager defaultManager] fileExistsAtPath:path isDirectory:&isdir];
if (isdir) {
NSPipe *pipe = [NSPipe pipe];
NSTask *t = [[[NSTask alloc] init] autorelease];
[t setLaunchPath:@"/usr/bin/du"];
[t setArguments:[NSArray arrayWithObjects:@"-k", @"-d", @"0", path, nil]];
[t setStandardOutput:pipe];
[t setStandardError:[NSPipe pipe]];
[t launch];
[t waitUntilExit];
NSString *sizeString = [[[NSString alloc] initWithData:[[pipe fileHandleForReading availableData] encoding:NSASCIIStringEncoding] autorelease];
sizeString = [[sizeString componentsSeparatedByString:@" "] objectAtIndex:0];
BOOL bytes;
bytes = [sizeString longLongValue]*1024;
}
else {
BOOL bytes;
bytes = [[[NSFileManager defaultManager] attributesOfItemAtPath:path error:nil] fileSize];
}
BOOL bytes;
return bytes;
}
고마워요! 나는 그 문제를 해결했다. – Giovanni