1/****************************************************************************************
2
3 Copyright (C) 2015 Autodesk, Inc.
4 All rights reserved.
5
6 Use of this software is subject to the terms of the Autodesk license agreement
7 provided at the time of installation or download, or which otherwise accompanies
8 this software in either electronic or hard copy form.
9
10****************************************************************************************/
11
12//! \file fbxfolder.h
13#ifndef _FBXSDK_CORE_BASE_FOLDER_H_
14#define _FBXSDK_CORE_BASE_FOLDER_H_
15
16#include <fbxsdk/fbxsdk_def.h>
17
18#ifndef FBXSDK_ENV_WINSTORE
19
20#include <fbxsdk/core/base/fbxstring.h>
21
22#include <fbxsdk/fbxsdk_nsbegin.h>
23
24/** Class for iterating into file system folders and the items contained. */
25class FBXSDK_DLL FbxFolder
26{
27public:
28 //! The different entry type that can be found in folders.
29 enum EEntryType
30 {
31 eRegularEntry, //!< Regular entry, such as file.
32 eFolderEntry //!< Folder entry that potentially contain more files.
33 };
34
35 /** Open the specified folder for browsing its content.
36 * \param pFolderPath_UTF8 The folder path to open.
37 * \return True if the folder path was successfully open, false otherwise. */
38 bool Open(const char* pFolderPath_UTF8);
39
40 /** Get the next item in the folder.
41 * \return True if another item was found after the current one. */
42 bool Next();
43
44 /** Get the type of the current entry in the folder.
45 * \return The entry type. */
46 EEntryType GetEntryType() const;
47
48 /** Retrieve the name of the current entry in the folder.
49 * \return The name of the current entry. */
50 FbxString GetEntryName() const;
51
52 /** Retrieve the extension name of the current entry.
53 * \return The extension name of the current entry. */
54 char* GetEntryExtension() const;
55
56 /** Close the folder when done browsing its content. */
57 void Close();
58
59 /** Find out if the folder was successfully opened the last time Open was called.
60 * \return True if the folder is currently open. */
61 bool IsOpen() const;
62
63/*****************************************************************************************************************************
64** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
65*****************************************************************************************************************************/
66#ifndef DOXYGEN_SHOULD_SKIP_THIS
67 FbxFolder();
68 ~FbxFolder();
69
70private:
71 struct FolderImpl;
72 FolderImpl* mImpl;
73#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
74};
75
76#include <fbxsdk/fbxsdk_nsend.h>
77
78#endif /* !FBXSDK_ENV_WINSTORE */
79
80#endif /* _FBXSDK_CORE_BASE_FOLDER_H_ */
81