PLCnext API Documentation  22.0.0.43
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/RscStreamAdapter.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 
29 class IFileService : public IRscService
30 {
31 public: // typedefs
32  using Ptr = std::shared_ptr<IFileService>;
33 
34 public: // construction/destruction
36  IFileService(void) = default;
37 
38 public: // static policy operation
39  static IRscServiceProxyFactory& GetProxyFactory(void);
40 
41 public: // abstract operations
49  virtual boolean Exists(const RscString<512>& path) = 0;
50 
61  virtual FileSystemError Write(const RscString<512>& filePath, boolean overwrite, const std::vector<TraitItem>& traitItems, RscStreamAdapter data) = 0;
62 
73  virtual FileSystemError Read(Traits fileTraits, const RscString<512>& filePath, RscStreamAdapter data, std::vector<TraitItem>& traitItems) = 0;
74 
82  virtual FileSystemError Delete(const RscString<512>& filePath) = 0;
83 
94  virtual FileSystemError Move(boolean createDirectory, boolean overwrite, const RscString<512>& sourceFilePath, const RscString<512>& destinationFilePath) = 0;
95 
106  virtual FileSystemError Copy(boolean createDirectory, boolean overwrite, const RscString<512>& sourceFilePath, const RscString<512>& destinationFilePath) = 0;
107 };
108 
110 // inline methods of class IFileService
111 inline IRscServiceProxyFactory& IFileService::GetProxyFactory()
112 {
113  return FileServiceProxyFactory::GetInstance();
114 }
115 
116 }}}}} // 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
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
This class serves as adapter between Rsc streams and streams from Arp::System::Commons::Io, e.g. file streams.
Definition: RscStreamAdapter.hpp:19
Specifies read access to the file. Data can be read from the file and the file pointer can be moved...
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 several files in a single call.
Definition: IFileService.hpp:29