@@ -208,50 +208,50 @@ } return ret; } -+ (BOOL)fileExistsAtPath: (OFString*)path ++ (bool)fileExistsAtPath: (OFString*)path { #ifndef _WIN32 struct stat s; if (stat([path cStringWithEncoding: OF_STRING_ENCODING_NATIVE], &s) == -1) - return NO; + return false; #else struct _stat s; if (_wstat([path UTF16String], &s) == -1) - return NO; + return false; #endif if (S_ISREG(s.st_mode)) - return YES; + return true; - return NO; + return false; } -+ (BOOL)directoryExistsAtPath: (OFString*)path ++ (bool)directoryExistsAtPath: (OFString*)path { #ifndef _WIN32 struct stat s; if (stat([path cStringWithEncoding: OF_STRING_ENCODING_NATIVE], &s) == -1) - return NO; + return false; #else struct _stat s; if (_wstat([path UTF16String], &s) == -1) - return NO; + return false; #endif if (S_ISDIR(s.st_mode)) - return YES; + return true; - return NO; + return false; } + (void)createDirectoryAtPath: (OFString*)path { #ifndef _WIN32 @@ -264,11 +264,11 @@ exceptionWithClass: self path: path]; } + (void)createDirectoryAtPath: (OFString*)path - createParents: (BOOL)createParents + createParents: (bool)createParents { void *pool; OFArray *pathComponents; OFString *currentPath = nil, *component; OFEnumerator *enumerator; @@ -511,11 +511,11 @@ + (void)copyFileAtPath: (OFString*)source toPath: (OFString*)destination { void *pool = objc_autoreleasePoolPush(); - BOOL override; + bool override; OFFile *sourceFile = nil; OFFile *destinationFile = nil; char *buffer; size_t pageSize; @@ -694,11 +694,11 @@ @throw [OFOpenFileFailedException exceptionWithClass: [self class] path: path mode: mode]; - _closable = YES; + _closable = true; } @catch (id e) { [self release]; @throw e; } @@ -712,14 +712,14 @@ _fd = fd; return self; } -- (BOOL)lowlevelIsAtEndOfStream +- (bool)lowlevelIsAtEndOfStream { if (_fd == -1) - return YES; + return true; return _atEndOfStream; } - (size_t)lowlevelReadIntoBuffer: (void*)buffer @@ -732,11 +732,11 @@ @throw [OFReadFailedException exceptionWithClass: [self class] stream: self requestedLength: length]; if (ret == 0) - _atEndOfStream = YES; + _atEndOfStream = true; return ret; } - (void)lowlevelWriteBuffer: (const void*)buffer