00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include <stdio.h>
00013
00014 #ifndef _WIN32
00015 #include <sys/types.h>
00016 #else
00017 typedef int uid_t;
00018 typedef int gid_t;
00019 #endif
00020
00021 #import "OFStream.h"
00022 #import "OFString.h"
00023
00027 @interface OFFile: OFStream
00028 {
00029 FILE *fp;
00030 BOOL close;
00031 }
00032
00038 + fileWithPath: (OFString*)path
00039 mode: (OFString*)mode;
00040
00046 + fileWithFilePointer: (FILE*)fp;
00047
00057 + (void)changeModeOfFile: (OFString*)path
00058 toMode: (mode_t)mode;
00059
00070 + (void)changeOwnerOfFile: (OFString*)path
00071 toOwner: (uid_t)owner
00072 group: (gid_t)group;
00073
00080 + (void)rename: (OFString*)from
00081 to: (OFString*)to;
00082
00088 + (void)delete: (OFString*)path;
00089
00098 + (void)link: (OFString*)src
00099 to: (OFString*)dest;
00100
00109 + (void)symlink: (OFString*)src
00110 to: (OFString*)dest;
00111
00119 - initWithPath: (OFString*)path
00120 mode: (OFString*)mode;
00121
00128 - initWithFilePointer: (FILE*)fp;
00129 @end
00130
00131 @interface OFFileSingleton: OFFile
00132 @end
00133
00135 extern OFFile *of_stdin;
00137 extern OFFile *of_stdout;
00139 extern OFFile *of_stderr;