ZenLib
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
ZenLib
Dir.h
Go to the documentation of this file.
1
// ZenLib::Dir - Directories functions
2
// Copyright (C) 2007-2011 MediaArea.net SARL, Info@MediaArea.net
3
//
4
// This software is provided 'as-is', without any express or implied
5
// warranty. In no event will the authors be held liable for any damages
6
// arising from the use of this software.
7
//
8
// Permission is granted to anyone to use this software for any purpose,
9
// including commercial applications, and to alter it and redistribute it
10
// freely, subject to the following restrictions:
11
//
12
// 1. The origin of this software must not be misrepresented; you must not
13
// claim that you wrote the original software. If you use this software
14
// in a product, an acknowledgment in the product documentation would be
15
// appreciated but is not required.
16
// 2. Altered source versions must be plainly marked as such, and must not be
17
// misrepresented as being the original software.
18
// 3. This notice may not be removed or altered from any source distribution.
19
//
20
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
21
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
22
//
23
// Directories functions
24
//
25
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
26
27
//---------------------------------------------------------------------------
28
#ifndef ZenLib_DirH
29
#define ZenLib_DirH
30
//---------------------------------------------------------------------------
31
32
//---------------------------------------------------------------------------
33
#include "
ZenLib/Conf.h
"
34
#include "
ZenLib/ZtringList.h
"
35
//---------------------------------------------------------------------------
36
37
namespace
ZenLib
38
{
39
40
//***************************************************************************
41
/// @brief Directory manipulation
42
//***************************************************************************
43
44
class
Dir
45
{
46
public
:
47
//---------------------------------------------------------------------------
48
/// @brief Options for Open method
49
enum
dirlist_t
50
{
51
Nothing
= 0x00,
///<
52
Include_Files
= 0x01,
///< Include files
53
Include_Dirs
= 0x02,
///< Include directories
54
Include_Hidden
= 0x04,
///< Include hidden files
55
Parse_SubDirs
= 0x10
///< Parse subdirectories
56
};
57
58
//Constructor/Destructor
59
60
//Open/close
61
static
ZtringList
GetAllFileNames
(
const
Ztring
&Dir_Name,
dirlist_t
Options=(
dirlist_t
)(
Include_Files
|
Parse_SubDirs
));
62
63
//Helpers
64
static
bool
Exists
(
const
Ztring
&Dir_Name);
65
static
bool
Create
(
const
Ztring
&Dir_Name);
66
};
67
68
}
//NameSpace
69
70
#endif
Generated on Mon Aug 20 2012 23:45:26 for ZenLib by
1.8.1.2