PLCnext API Documentation  21.0.0.35466
IFileService.hpp
1 //
3 // Copyright PHOENIX CONTACT Electronics GmbH
4 //
6 #pragma once
7 #include "Arp/System/Core/Arp.h"
8 #include "Arp/System/Rsc/Services/IRscService.hpp"
9 #include "FileServiceProxyFactory.hpp"
10 #include "Arp/System/Rsc/Services/RscStream.hpp"
11 #include "Arp/System/Rsc/Services/RscString.hxx"
12 #include "FileSystemError.hpp"
13 #include "TraitItem.hpp"
14 #include "Traits.hpp"
15 #include <vector>
16 
17 // DO NOT MODIFY THIS FILE, THIS FILE IS AUTOGENERATED BY IFileService.cs
18 
19 namespace Arp { namespace System { namespace Commons { namespace Services { namespace Io
20 {
21 
22 using namespace Arp;
23 using namespace Arp::System::Rsc::Services;
24 
30 class IFileService : public IRscService
31 {
32 public: // typedefs
33  typedef std::shared_ptr<IFileService> Ptr;
34 
35 public: // construction/destruction
37  IFileService(void);
39  virtual ~IFileService(void);
40 
41 public: // static policy operation
42  static IRscServiceProxyFactory& GetProxyFactory(void);
43 
44 public: // abstract operations
52  virtual boolean Exists(const RscString<512>& path) = 0;
53 
64  virtual FileSystemError Write(const RscString<512>& filePath, boolean overwrite, const std::vector<TraitItem>& traitItems, RscStream& data) = 0;
65 
76  virtual FileSystemError Read(Traits fileTraits, const RscString<512>& filePath, RscStream& data, std::vector<TraitItem>& traitItems) = 0;
77 
85  virtual FileSystemError Delete(const RscString<512>& filePath) = 0;
86 
97  virtual FileSystemError Move(boolean createDirectory, boolean overwrite, const RscString<512>& sourceFilePath, const RscString<512>& destinationFilePath) = 0;
98 
109  virtual FileSystemError Copy(boolean createDirectory, boolean overwrite, const RscString<512>& sourceFilePath, const RscString<512>& destinationFilePath) = 0;
110 
111 private: // deleted methods (for non-copyable classes)
112  IFileService(const IFileService& arg) = delete;
113  IFileService& operator=(const IFileService& arg) = delete;
114 };
115 
117 // inline methods of class IFileService
119 {
120 }
121 
123 {
124 }
125 
126 inline IRscServiceProxyFactory& IFileService::GetProxyFactory()
127 {
128  return FileServiceProxyFactory::GetInstance();
129 }
130 
131 }}}}} // end of namespace Arp::System::Commons::Services::Io
Specifies write access to the file. Data can be written to the file and the file pointer can be moved...
Namespace for classes and interfaces for the Remote Service Call implementation
Definition: IRscReadEnumerator.hxx:9
IFileService(void)
Constructs an IFileService instance.
Definition: IFileService.hpp:118
virtual ~IFileService(void)
Destructs this instance and frees all resouces.
Definition: IFileService.hpp:122
Traits
This enum is used by several file services to specify the file traits to get or set, respectively.
Definition: Traits.hpp:20
FileSystemError
This enum is used by several file operations.
Definition: FileSystemError.hpp:20
Specifies read access to the file. Data can be read from the file and the file pointer can be moved...
Enables Rsc services to marshal large data packets as stream.
Definition: RscStream.hpp:17
Root namespace for the PLCnext API
Base interface for all Rsc service interface.
Definition: IRscService.hpp:18
System components used by the System, Device, Plc or Io domains.
Provides common file operations for reading and writing files as well as deleting/moving/copying file...
Definition: IFileService.hpp:30