File_VX.h 1.7 KB

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