00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00022 #ifndef flc_dir_sys_H
00023 #define flc_dir_sys_H
00024
00025 #include <falcon/filestat.h>
00026 #include <falcon/falcondata.h>
00027 #include <falcon/string.h>
00028
00029 namespace Falcon {
00030
00038 class DirEntry: public FalconData
00039 {
00040
00041 protected:
00042 uint32 m_lastError;
00043 String m_path;
00044
00045 public:
00046 DirEntry( const String &path ):
00047 m_lastError(0),
00048 m_path( path )
00049 {}
00050
00051 virtual bool read( String &fname ) = 0;
00052 virtual void close() = 0;
00053 uint32 lastError() const { return m_lastError; }
00054
00055
00056 virtual FalconData *clone() const { return 0; }
00057 virtual void gcMark( uint32 mark ) {}
00058
00059 const String &path() const { return m_path; }
00060 };
00061
00062 namespace Sys {
00063
00064 bool FALCON_DYN_SYM fal_fileType( const String &filename, FileStat::e_fileType &st );
00065 bool FALCON_DYN_SYM fal_stats( const String &filename, FileStat &st );
00066 bool FALCON_DYN_SYM fal_mkdir( const String &filename, int32 &fsStatus );
00067 bool FALCON_DYN_SYM fal_unlink( const String &filename, int32 &fsStatus );
00068 bool FALCON_DYN_SYM fal_rmdir( const String &filename, int32 &fsStatus );
00069 bool FALCON_DYN_SYM fal_chdir( const String &filename, int32 &fsStatus );
00070 bool FALCON_DYN_SYM fal_move( const String &filename, const String &dest, int32 &fsStatus );
00071 bool FALCON_DYN_SYM fal_getcwd( String &fname, int32 &fsError );
00072 bool FALCON_DYN_SYM fal_chmod( const String &fname, uint32 mode );
00073 bool FALCON_DYN_SYM fal_chown( const String &fname, int32 owner );
00074 bool FALCON_DYN_SYM fal_chgrp( const String &fname, int32 grp );
00075 bool FALCON_DYN_SYM fal_readlink( const String &fname, String &link );
00076 bool FALCON_DYN_SYM fal_writelink( const String &fname, const String &link );
00077 DirEntry FALCON_DYN_SYM *fal_openDir( const String &path, int32 &fsError );
00078 void FALCON_DYN_SYM fal_closeDir( DirEntry *entry );
00079 }
00080 }
00081
00082 #endif
00083
00084