00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef OSDL_EMBEDDED_DIRECTORY_H_
00028 #define OSDL_EMBEDDED_DIRECTORY_H_
00029
00030
00031 #include "Ceylan.h"
00032
00033
00034 #include <list>
00035 #include <string>
00036
00037
00038
00039
00040 namespace OSDL
00041 {
00042
00043
00044
00045
00046
00047
00048
00049
00050 class EmbeddedFileSystemManager ;
00051
00052
00053
00069 class OSDL_DLL EmbeddedDirectory: public Ceylan::System::Directory
00070 {
00071
00072
00073 public:
00074
00075
00076
00086 virtual ~EmbeddedDirectory() throw() ;
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00109 virtual bool hasDirectory(
00110 const std::string & subdirectoryName ) const ;
00111
00112
00113
00125 virtual bool hasFile( const std::string & fileName ) const ;
00126
00127
00128
00140 virtual bool hasEntry( const std::string & entryName ) const ;
00141
00142
00143
00158 virtual void getSubdirectories(
00159 std::list<std::string> & subDirectories ) const ;
00160
00161
00162
00174 virtual void getFiles( std::list<std::string> & files ) const ;
00175
00176
00177
00199 virtual void getEntries( std::list<std::string> & entries ) const ;
00200
00201
00202
00225 virtual void getSortedEntries(
00226 std::list<std::string> & subDirectories,
00227 std::list<std::string> & files,
00228 std::list<std::string> & otherEntries ) const ;
00229
00230
00231
00232
00233
00234
00235
00236
00237
00238
00239
00240
00252 virtual const std::string toString(
00253 Ceylan::VerbosityLevels level = Ceylan::high ) const ;
00254
00255
00256
00257
00258
00259
00260
00261
00262
00279 static EmbeddedDirectory & Create(
00280 const std::string & newDirectoryName ) ;
00281
00282
00283
00303 static EmbeddedDirectory & Open(
00304 const std::string & directoryName = "" ) ;
00305
00306
00307
00337 explicit EmbeddedDirectory( const std::string & directoryName,
00338 bool create = true ) ;
00339
00340
00341
00342
00343 protected:
00344
00345
00346
00355 virtual Ceylan::System::FileSystemManager &
00356 getCorrespondingFileSystemManager() const ;
00357
00358
00359
00365 static const std::string RootDirectoryPrefix ;
00366
00367
00368
00375 static const std::string CurrentDirectoryAlias ;
00376
00377
00378
00385 static const std::string UpperDirectoryAlias ;
00386
00387
00388
00393 static const char Separator ;
00394
00395
00396
00397
00398 private:
00399
00400
00401
00409 EmbeddedDirectory( const EmbeddedDirectory & source ) ;
00410
00411
00412
00420 EmbeddedDirectory & operator = (
00421 const EmbeddedDirectory & source ) ;
00422
00423
00424
00425 } ;
00426
00427
00428 }
00429
00430
00431
00432 #endif // OSDL_EMBEDDED_DIRECTORY_H_
00433