00001 /* Copyright (c) MediaArea.net SARL. All Rights Reserved. 00002 * 00003 * Use of this source code is governed by a zlib-style license that can 00004 * be found in the License.txt file in the root of the source tree. 00005 */ 00006 00007 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00008 // 00009 // Directories functions 00010 // 00011 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00012 00013 //--------------------------------------------------------------------------- 00014 #ifndef ZenLib_DirH 00015 #define ZenLib_DirH 00016 //--------------------------------------------------------------------------- 00017 00018 //--------------------------------------------------------------------------- 00019 #include "ZenLib/ZtringList.h" 00020 //--------------------------------------------------------------------------- 00021 00022 namespace ZenLib 00023 { 00024 00025 //*************************************************************************** 00026 /// @brief Directory manipulation 00027 //*************************************************************************** 00028 00029 class Dir 00030 { 00031 public : 00032 //--------------------------------------------------------------------------- 00033 /// @brief Options for Open method 00034 enum dirlist_t 00035 { 00036 Nothing = 0x00, ///< 00037 Include_Files = 0x01, ///< Include files 00038 Include_Dirs = 0x02, ///< Include directories 00039 Include_Hidden = 0x04, ///< Include hidden files 00040 Parse_SubDirs = 0x10 ///< Parse subdirectories 00041 }; 00042 00043 //Constructor/Destructor 00044 00045 //Open/close 00046 static ZtringList GetAllFileNames(const Ztring &Dir_Name, dirlist_t Options=(dirlist_t)(Include_Files|Parse_SubDirs)); 00047 00048 //Helpers 00049 static bool Exists(const Ztring &Dir_Name); 00050 static bool Create(const Ztring &Dir_Name); 00051 }; 00052 00053 } //NameSpace 00054 00055 #endif