00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef FXDIR_H
00025 #define FXDIR_H
00026
00027 #include "FXIO.h"
00028
00029 namespace FX {
00030
00031
00032
00034 class FXAPI FXDir {
00035 private:
00036 FXuval space[256];
00037 private:
00038 FXDir(const FXDir&);
00039 FXDir &operator=(const FXDir&);
00040 public:
00041
00043 enum {
00044 MatchAll = 0,
00045 NoFiles = 1,
00046 NoDirs = 2,
00047 AllFiles = 4,
00048 AllDirs = 8,
00049 HiddenFiles = 16,
00050 HiddenDirs = 32,
00051 NoParent = 64,
00052 CaseFold = 128
00053 };
00054
00055 public:
00056
00058 FXDEPRECATEDEXT FXDir();
00059
00061 FXDEPRECATEDEXT FXDir(const FXString& path);
00062
00064 virtual bool open(const FXString& path);
00065
00067 virtual bool isOpen() const;
00068
00070 virtual bool next();
00071
00073 virtual FXString name() const;
00074
00076 virtual void close();
00077
00079 static bool create(const FXString& path,FXuint mode=FXIO::OwnerFull|FXIO::GroupFull|FXIO::OtherFull);
00080
00082 static bool remove(const FXString& path);
00083
00085 static bool rename(const FXString& srcpath,const FXString& dstpath);
00086
00092 static FXint listFiles(FXString*& filelist,const FXString& path,const FXString& pattern="*",FXuint flags=FXDir::MatchAll);
00093
00098 static FXint listDrives(FXString*& drivelist);
00099
00100
00102 virtual ~FXDir();
00103 };
00104
00105 }
00106
00107 #endif