aboutsummaryrefslogtreecommitdiff
path: root/dep/CascLib/src/common/Directory.h
blob: f2f0d5e4c651bdb3acdfe852b38caddafc7adfa9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*****************************************************************************/
/* Directory.h                            Copyright (c) Ladislav Zezula 2015 */
/*---------------------------------------------------------------------------*/
/* Directory functions for CascLib                                           */
/*---------------------------------------------------------------------------*/
/*   Date    Ver   Who  Comment                                              */
/* --------  ----  ---  -------                                              */
/* 30.10.15  1.00  Lad  The first version of Directory.h                     */
/*****************************************************************************/

#ifndef __DIRECTORY_H__
#define __DIRECTORY_H__

//-----------------------------------------------------------------------------
// Scanning a directory

// If the callback returns false, the directory enumeration stops
typedef bool (*DIRECTORY_CALLBACK)(LPCTSTR szPathName, void * pvContext);

bool DirectoryExists(
    LPCTSTR szDirectory
    );

bool MakeDirectory(
    LPCTSTR szDirectory
    );

DWORD ScanDirectory(
    LPCTSTR szDirectory,
    DIRECTORY_CALLBACK PfnFolderCallback,       // Can be NULL if the caller doesn't care about folders
    DIRECTORY_CALLBACK PfnFileCallback,         // Can be NULL if the caller doesn't care about files
    void * pvContext
    );

#endif // __DIRECTORY_H__