00001 #ifndef file_h
00002 #define file_h
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #include "gendefs.h"
00017 #include "timefun.h"
00018
00019
00022 namespace File
00023 {
00024 mGlobal bool exists(const char*);
00025 mGlobal bool isEmpty(const char*);
00026 mGlobal bool isFile(const char*);
00027 mGlobal bool isDirectory(const char*);
00028
00029 mGlobal const char* getCanonicalPath(const char*);
00030 mGlobal const char* getRelativePath(const char* reltodir,const char* fnm);
00031
00032 mGlobal bool createLink(const char* from,const char* to);
00033 mGlobal bool isLink(const char*);
00034 mGlobal const char* linkTarget(const char* linkname);
00035
00036 mGlobal bool isWritable(const char*);
00037 mGlobal bool makeWritable(const char*,bool recursive,bool yesno);
00038 mGlobal bool setPermissions(const char*,const char* perms,
00039 bool recursive);
00040
00041 mGlobal bool createDir(const char*);
00042 mGlobal bool rename(const char* oldname,const char* newname);
00043 mGlobal bool copy(const char* from,const char* to);
00044 mGlobal bool remove(const char*);
00045 mGlobal bool saveCopy(const char* from,const char* to);
00046 mGlobal bool copyDir(const char* from,const char* to);
00047 mGlobal bool removeDir(const char*);
00048
00049 mGlobal int getKbSize(const char*);
00051
00052 mGlobal const char* timeCreated(const char* filenm,
00053 const char* fmt=Time::defDateTimeFmt());
00054 mGlobal const char* timeLastModified(const char* filenm,
00055 const char* fmt=Time::defDateTimeFmt());
00056 mGlobal od_int64 getTimeInSeconds(const char*);
00057
00058 mGlobal const char* getCurrentPath();
00059 mGlobal const char* getHomePath();
00060 mGlobal const char* getTempPath();
00061
00062 }
00063
00064
00065 #endif