FilePath.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /* mbed Microcontroller Library
  2. * Copyright (c) 2006-2013 ARM Limited
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #ifndef MBED_FILEPATH_H
  17. #define MBED_FILEPATH_H
  18. #include "platform/platform.h"
  19. #include "platform/FileSystemLike.h"
  20. #include "platform/FileLike.h"
  21. namespace mbed {
  22. /** \addtogroup platform */
  23. /** @{*/
  24. /**
  25. * \defgroup platform_FilePath FilePath class
  26. * @{
  27. */
  28. class FileSystem;
  29. /** Class FilePath
  30. *
  31. */
  32. class FilePath {
  33. public:
  34. /** Constructor FilePath
  35. *
  36. * @param file_path The path of file.
  37. */
  38. FilePath(const char *file_path);
  39. const char *fileName(void);
  40. bool isFileSystem(void);
  41. FileSystemLike *fileSystem(void);
  42. bool isFile(void);
  43. FileLike *file(void);
  44. bool exists(void);
  45. private:
  46. const char *file_name;
  47. FileBase *fb;
  48. };
  49. /**@}*/
  50. /**@}*/
  51. } // namespace mbed
  52. #endif