ZenLib
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
ZenLib
Dir.h
Go to the documentation of this file.
1
/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
2
*
3
* Use of this source code is governed by a zlib-style license that can
4
* be found in the License.txt file in the root of the source tree.
5
*/
6
7
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
8
//
9
// Directories functions
10
//
11
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
12
13
//---------------------------------------------------------------------------
14
#ifndef ZenLib_DirH
15
#define ZenLib_DirH
16
//---------------------------------------------------------------------------
17
18
//---------------------------------------------------------------------------
19
#include "
ZenLib/ZtringList.h
"
20
//---------------------------------------------------------------------------
21
22
namespace
ZenLib
23
{
24
25
//***************************************************************************
26
/// @brief Directory manipulation
27
//***************************************************************************
28
29
class
Dir
30
{
31
public
:
32
//---------------------------------------------------------------------------
33
/// @brief Options for Open method
34
enum
dirlist_t
35
{
36
Nothing
= 0x00,
///<
37
Include_Files
= 0x01,
///< Include files
38
Include_Dirs
= 0x02,
///< Include directories
39
Include_Hidden
= 0x04,
///< Include hidden files
40
Parse_SubDirs
= 0x10
///< Parse subdirectories
41
};
42
43
//Constructor/Destructor
44
45
//Open/close
46
static
ZtringList
GetAllFileNames
(
const
Ztring
&Dir_Name,
dirlist_t
Options=(
dirlist_t
)(
Include_Files
|
Parse_SubDirs
));
47
48
//Helpers
49
static
bool
Exists
(
const
Ztring
&Dir_Name);
50
static
bool
Create
(
const
Ztring
&Dir_Name);
51
};
52
53
#ifdef WINDOWS
54
class
GetAllFileNames_Private;
55
class
GetAllFileNames
56
{
57
public
:
58
//Constructor/Destructor
59
GetAllFileNames();
60
~GetAllFileNames();
61
62
//
63
void
Start (
const
Ztring &Dir_Name,
Dir::dirlist_t
Options=(
Dir::dirlist_t
)(
Dir::Include_Files
|
Dir::Parse_SubDirs
));
64
bool
Next (Ztring& Name);
65
void
Close ();
66
67
private
:
68
GetAllFileNames_Private* p;
69
};
70
#endif //WINDOWS
71
72
}
//NameSpace
73
74
#endif
Generated on Sun Apr 24 2016 16:46:23 for ZenLib by
1.8.1.2