File_VMS.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. //
  2. // File_VMS.h
  3. //
  4. // Library: Foundation
  5. // Package: Filesystem
  6. // Module: File
  7. //
  8. // Definition of the FileImpl class for OpenVMS.
  9. //
  10. // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
  11. // and Contributors.
  12. //
  13. // SPDX-License-Identifier: BSL-1.0
  14. //
  15. #ifndef Foundation_File_VMS_INCLUDED
  16. #define Foundation_File_VMS_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 setPath(const std::string& path);
  27. void swapImpl(FileImpl& file);
  28. void setPathImpl(const std::string& path);
  29. const std::string& getPathImpl() const;
  30. bool existsImpl() const;
  31. bool canReadImpl() const;
  32. bool canWriteImpl() const;
  33. bool canExecuteImpl() const;
  34. bool isFileImpl() const;
  35. bool isDirectoryImpl() const;
  36. bool isLinkImpl() const;
  37. bool isDeviceImpl() const;
  38. bool isHiddenImpl() const;
  39. Timestamp createdImpl() const;
  40. Timestamp getLastModifiedImpl() const;
  41. void setLastModifiedImpl(const Timestamp& ts);
  42. FileSizeImpl getSizeImpl() const;
  43. void setSizeImpl(FileSizeImpl size);
  44. void setWriteableImpl(bool flag = true);
  45. void setExecutableImpl(bool flag = true);
  46. void copyToImpl(const std::string& path) const;
  47. void renameToImpl(const std::string& path);
  48. void removeImpl();
  49. bool createFileImpl();
  50. bool createDirectoryImpl();
  51. static void handleLastError(const std::string& path);
  52. private:
  53. std::string _path;
  54. };
  55. //
  56. // inlines
  57. //
  58. inline const std::string& FileImpl::getPathImpl() const
  59. {
  60. return _path;
  61. }
  62. } // namespace Poco
  63. #endif // Foundation_File_VMS_INCLUDED