@@ -27,14 +27,14 @@ static OFFileSingleton *of_file_stdout = nil; static OFFileSingleton *of_file_stderr = nil; @implementation OFFile + fileWithPath: (OFString*)path - andMode: (OFString*)mode + mode: (OFString*)mode { return [[[self alloc] initWithPath: path - andMode: mode] autorelease]; + mode: mode] autorelease]; } + standardInput { if (of_file_stdin == nil) @@ -73,12 +73,12 @@ chmod([path cString], mode); #endif } + (void)changeOwnerOfFile: (OFString*)path - toOwner: (uid_t)owner - andGroup: (gid_t)group + owner: (uid_t)owner + group: (gid_t)group { /* FIXME: On error, throw exception */ #ifndef _WIN32 chown([path cString], owner, group); #endif @@ -107,22 +107,22 @@ symlink([src cString], [dest cString]); #endif } - initWithPath: (OFString*)path - andMode: (OFString*)mode + mode: (OFString*)mode { Class c; self = [super init]; if ((fp = fopen([path cString], [mode cString])) == NULL) { c = isa; [super dealloc]; @throw [OFOpenFileFailedException newWithClass: c - andPath: path - andMode: mode]; + path: path + mode: mode]; } return self; } @@ -150,12 +150,12 @@ if (fp == NULL || feof(fp) || ((ret = fread(buf, size, nitems, fp)) == 0 && size != 0 && nitems != 0 && !feof(fp))) @throw [OFReadFailedException newWithClass: isa - andSize: size - andNItems: nitems]; + size: size + items: nitems]; return ret; } - (size_t)readNBytes: (size_t)size @@ -174,12 +174,12 @@ if (fp == NULL || feof(fp) || ((ret = fwrite(buf, size, nitems, fp)) < nitems && size != 0 && nitems != 0)) @throw [OFWriteFailedException newWithClass: isa - andSize: size - andNItems: nitems]; + size: size + items: nitems]; return ret; } - (size_t)writeNBytes: (size_t)size @@ -236,9 +236,9 @@ } - (void)dealloc { @throw [OFNotImplementedException newWithClass: isa - andSelector: _cmd]; + selector: _cmd]; [super dealloc]; /* Get rid of stupid warning */ } @end