fbxfolder.h 2.7 KB

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