00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef FXSTAT_H
00022 #define FXSTAT_H
00023
00024
00025 namespace FX {
00026
00027
00028 class FXFile;
00029
00030
00032 class FXAPI FXStat {
00033 private:
00034 FXuint modeFlags;
00035 FXuint userNumber;
00036 FXuint groupNumber;
00037 FXuint linkCount;
00038 FXTime createTime;
00039 FXTime accessTime;
00040 FXTime modifyTime;
00041 FXlong fileVolume;
00042 FXlong fileIndex;
00043 FXlong fileSize;
00044 public:
00045
00047 FXuint mode() const { return modeFlags; }
00048
00050 FXuint user() const { return userNumber; }
00051
00053 FXuint group() const { return groupNumber; }
00054
00056 FXuint links() const { return linkCount; }
00057
00059 FXTime created() const { return createTime; }
00060
00062 FXTime accessed() const { return accessTime; }
00063
00065 FXTime modified() const { return modifyTime; }
00066
00068 FXlong volume() const { return fileVolume; }
00069
00071 FXlong index() const { return fileIndex; }
00072
00074 FXlong size() const { return fileSize; }
00075
00077 FXbool isHidden() const;
00078
00080 FXbool isDirectory() const;
00081
00083 FXbool isFile() const;
00084
00086 FXbool isLink() const;
00087
00089 FXbool isSetUid() const;
00090
00092 FXbool isSetGid() const;
00093
00095 FXbool isSetSticky() const;
00096
00098 FXbool isCharacter() const;
00099
00101 FXbool isBlock() const;
00102
00104 FXbool isSocket() const;
00105
00107 FXbool isFifo() const;
00108
00110 FXbool isReadable() const;
00111
00113 FXbool isWritable() const;
00114
00116 FXbool isExecutable() const;
00117
00119 FXbool isOwnerReadWriteExecute() const;
00120
00122 FXbool isOwnerReadable() const;
00123
00125 FXbool isOwnerWritable() const;
00126
00128 FXbool isOwnerExecutable() const;
00129
00131 FXbool isGroupReadWriteExecute() const;
00132
00134 FXbool isGroupReadable() const;
00135
00137 FXbool isGroupWritable() const;
00138
00140 FXbool isGroupExecutable() const;
00141
00143 FXbool isOtherReadWriteExecute() const;
00144
00146 FXbool isOtherReadable() const;
00147
00149 FXbool isOtherWritable() const;
00150
00152 FXbool isOtherExecutable() const;
00153
00154
00156 static FXbool statFile(const FXString& file,FXStat& info);
00157
00159 static FXbool statLink(const FXString& file,FXStat& info);
00160
00162 static FXbool stat(const FXFile& file,FXStat& info);
00163
00164
00166 static FXuint mode(const FXString& file);
00167
00169 static FXbool mode(const FXString& file,FXuint perm);
00170
00172 static FXbool exists(const FXString& file);
00173
00175 static FXlong size(const FXString& file);
00176
00178 static FXlong volume(const FXString& file);
00179
00181 static FXlong index(const FXString& file);
00182
00184 static FXuint links(const FXString& file);
00185
00191 static FXTime modified(const FXString& file);
00192
00197 static FXTime accessed(const FXString& file);
00198
00205 static FXTime created(const FXString& file);
00206
00208 static FXbool isHidden(const FXString& file);
00209
00211 static FXbool isFile(const FXString& file);
00212
00214 static FXbool isLink(const FXString& file);
00215
00217 static FXbool isDirectory(const FXString& file);
00218
00220 static FXbool isReadable(const FXString& file);
00221
00223 static FXbool isWritable(const FXString& file);
00224
00226 static FXbool isExecutable(const FXString& file);
00227
00229 static FXbool isOwnerReadWriteExecute(const FXString& file);
00230
00232 static FXbool isOwnerReadable(const FXString& file);
00233
00235 static FXbool isOwnerWritable(const FXString& file);
00236
00238 static FXbool isOwnerExecutable(const FXString& file);
00239
00241 static FXbool isGroupReadWriteExecute(const FXString& file);
00242
00244 static FXbool isGroupReadable(const FXString& file);
00245
00247 static FXbool isGroupWritable(const FXString& file);
00248
00250 static FXbool isGroupExecutable(const FXString& file);
00251
00253 static FXbool isOtherReadWriteExecute(const FXString& file);
00254
00256 static FXbool isOtherReadable(const FXString& file);
00257
00259 static FXbool isOtherWritable(const FXString& file);
00260
00262 static FXbool isOtherExecutable(const FXString& file);
00263
00265 static FXbool isSetUid(const FXString& file);
00266
00268 static FXbool isSetGid(const FXString& file);
00269
00271 static FXbool isSetSticky(const FXString& file);
00272
00274 static FXbool getTotalDiskSpace(const FXString& path,FXulong& space);
00275
00277 static FXbool getAvailableDiskSpace(const FXString& path,FXulong& space);
00278 };
00279
00280
00281 }
00282
00283 #endif