File_VX.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. //
  2. // File_VX.h
  3. //
  4. // Library: Foundation
  5. // Package: Filesystem
  6. // Module: File
  7. //
  8. // Definition of the FileImpl class for VxWorks.
  9. //
  10. // Copyright (c) 2004-2011, Applied Informatics Software Engineering GmbH.
  11. // and Contributors.
  12. //
  13. // SPDX-License-Identifier: BSL-1.0
  14. //
  15. #ifndef Foundation_File_VX_INCLUDED
  16. #define Foundation_File_VX_INCLUDED
  17. #include "Poco/Foundation.h"
  18. namespace Poco {
  19. class FileImpl
  20. {
  21. protected:
  22. typedef UInt64 FileSizeImpl;
  23. FileImpl();
  24. FileImpl(const std::string& path);
  25. virtual ~FileImpl();
  26. void swapImpl(FileImpl& file);
  27. void setPathImpl(const std::string& path);
  28. const std::string& getPathImpl() const;
  29. bool existsImpl() const;
  30. bool canReadImpl() const;
  31. bool canWriteImpl() const;
  32. bool canExecuteImpl() const;
  33. bool isFileImpl() const;
  34. bool isDirectoryImpl() const;
  35. bool isLinkImpl() const;
  36. bool isDeviceImpl() const;
  37. bool isHiddenImpl() const;
  38. Timestamp createdImpl() const;
  39. Timestamp getLastModifiedImpl() const;
  40. void setLastModifiedImpl(const Timestamp& ts);
  41. FileSizeImpl getSizeImpl() const;
  42. void setSizeImpl(FileSizeImpl size);
  43. void setWriteableImpl(bool flag = true);
  44. void setExecutableImpl(bool flag = true);
  45. void copyToImpl(const std::string& path) const;
  46. void renameToImpl(const std::string& path);
  47. void linkToImpl(const std::string& path, int type) const;
  48. void removeImpl();
  49. bool createFileImpl();
  50. bool createDirectoryImpl();
  51. FileSizeImpl totalSpaceImpl() const;
  52. FileSizeImpl usableSpaceImpl() const;
  53. FileSizeImpl freeSpaceImpl() const;
  54. static void handleLastErrorImpl(const std::string& path);
  55. private:
  56. std::string _path;
  57. friend class DirectoryIteratorImpl;
  58. };
  59. //
  60. // inlines
  61. //
  62. inline const std::string& FileImpl::getPathImpl() const
  63. {
  64. return _path;
  65. }
  66. } // namespace Poco
  67. #endif // Foundation_File_VX_INCLUDED