00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include <stdio.h>
00013
00014 #include <sys/types.h>
00015
00016 #import "OFStream.h"
00017
00018 @class OFString;
00019
00023 @interface OFFile: OFStream
00024 {
00025 FILE *fp;
00026 BOOL close;
00027 }
00028
00034 + fileWithPath: (OFString*)path
00035 mode: (OFString*)mode;
00036
00042 + fileWithFilePointer: (FILE*)fp;
00043
00053 + (void)changeModeOfFile: (OFString*)path
00054 toMode: (mode_t)mode;
00055
00056 #ifndef _WIN32
00057
00067 + (void)changeOwnerOfFile: (OFString*)path
00068 toOwner: (uid_t)owner
00069 group: (gid_t)group;
00070 #endif
00071
00078 + (void)rename: (OFString*)from
00079 to: (OFString*)to;
00080
00086 + (void)delete: (OFString*)path;
00087
00088 #ifndef _WIN32
00089
00097 + (void)link: (OFString*)src
00098 to: (OFString*)dest;
00099
00108 + (void)symlink: (OFString*)src
00109 to: (OFString*)dest;
00110 #endif
00111
00119 - initWithPath: (OFString*)path
00120 mode: (OFString*)mode;
00121
00128 - initWithFilePointer: (FILE*)fp;
00129 @end
00130
00132 extern OFFile *of_stdin;
00134 extern OFFile *of_stdout;
00136 extern OFFile *of_stderr;