PLCnext API Documentation 23.0.2.9
IFileService2.hpp
1
2//
3// Copyright PHOENIX CONTACT Electronics GmbH
4//
6#pragma once
8#include <vector>
9#include "Arp/System/Commons/Services/Io/FileService2ProxyFactory.hpp"
10#include "Arp/System/Commons/Services/Io/FileSystemError.hpp"
11#include "Arp/System/Commons/Services/Io/ReadFileData.hpp"
12#include "Arp/System/Commons/Services/Io/ReadFileInfo.hpp"
13#include "Arp/System/Commons/Services/Io/TraitItem.hpp"
14#include "Arp/System/Commons/Services/Io/Traits.hpp"
15#include "Arp/System/Commons/Services/Io/WriteFileData.hpp"
16#include "Arp/System/Core/delegate.hxx"
17#include "Arp/System/Rsc/Services/IRscReadEnumerator.hxx"
18#include "Arp/System/Rsc/Services/IRscService.hpp"
19#include "Arp/System/Rsc/Services/IRscWriteEnumerator.hxx"
20#include "Arp/System/Rsc/Services/RscStreamAdapter.hpp"
21#include "Arp/System/Rsc/Services/RscString.hxx"
22
23// DO NOT MODIFY THIS FILE, THIS FILE IS AUTOGENERATED BY IFileService2.cs
24
25namespace Arp { namespace System { namespace Commons { namespace Services { namespace Io
26{
27
28using namespace Arp;
29using namespace Arp::System::Rsc::Services;
30
37{
38public: // typedefs
39 using Ptr = std::shared_ptr<IFileService2>;
40 using DeleteManyFilePathsDelegate = delegate<void(IRscWriteEnumerator<RscString<512>>&)>;
41 using DeleteManyResultDelegate = delegate<void(IRscReadEnumerator<FileSystemError>&)>;
42 using ExistsManyPathsDelegate = delegate<void(IRscWriteEnumerator<RscString<512>>&)>;
43 using ExistsManyResultDelegate = delegate<void(IRscReadEnumerator<boolean>&)>;
44 using ReadManyReadFileDataDelegate = delegate<void(IRscReadEnumerator<ReadFileData>&)>;
45 using ReadManyReadFileInfoDelegate = delegate<void(IRscWriteEnumerator<ReadFileInfo>&)>;
46 using WriteManyResultDelegate = delegate<void(IRscReadEnumerator<FileSystemError>&)>;
47 using WriteManyWriteFileDataDelegate = delegate<void(IRscWriteEnumerator<WriteFileData>&)>;
48
49public: // construction/destruction
51 IFileService2(void) = default;
52
53public: // static policy operation
54 static IRscServiceProxyFactory& GetProxyFactory(void);
55
56public: // abstract operations
57 virtual boolean Exists(const RscString<512>& path) = 0;
58 virtual FileSystemError Write(const RscString<512>& filePath, boolean overwrite, const std::vector<TraitItem>& traitItems, RscStreamAdapter data) = 0;
59 virtual FileSystemError Read(Traits fileTraits, const RscString<512>& filePath, RscStreamAdapter data, std::vector<TraitItem>& traitItems) = 0;
60 virtual FileSystemError Delete(const RscString<512>& filePath) = 0;
61 virtual FileSystemError Move(boolean createDirectory, boolean overwrite, const RscString<512>& sourceFilePath, const RscString<512>& destinationFilePath) = 0;
62 virtual FileSystemError Copy(boolean createDirectory, boolean overwrite, const RscString<512>& sourceFilePath, const RscString<512>& destinationFilePath) = 0;
63
71 virtual void ExistsMany(ExistsManyPathsDelegate pathsDelegate, ExistsManyResultDelegate resultDelegate) = 0;
72
80 virtual void WriteMany(WriteManyWriteFileDataDelegate writeFileDataDelegate, WriteManyResultDelegate resultDelegate) = 0;
81
87 virtual void ReadMany(ReadManyReadFileInfoDelegate readFileInfoDelegate, ReadManyReadFileDataDelegate readFileDataDelegate) = 0;
88
96 virtual void DeleteMany(DeleteManyFilePathsDelegate filePathsDelegate, DeleteManyResultDelegate resultDelegate) = 0;
97};
98
100// inline methods of class IFileService2
101inline IRscServiceProxyFactory& IFileService2::GetProxyFactory()
102{
103 return FileService2ProxyFactory::GetInstance();
104}
105
106}}}}} // end of namespace Arp::System::Commons::Services::Io
Provides common file operations for several files in a single call.
Definition: IFileService2.hpp:37
virtual void ReadMany(ReadManyReadFileInfoDelegate readFileInfoDelegate, ReadManyReadFileDataDelegate readFileDataDelegate)=0
Reads the specified files.
IFileService2(void)=default
Constructs an IFileService2 instance.
virtual void ExistsMany(ExistsManyPathsDelegate pathsDelegate, ExistsManyResultDelegate resultDelegate)=0
Checks if the specified files exist.
virtual void DeleteMany(DeleteManyFilePathsDelegate filePathsDelegate, DeleteManyResultDelegate resultDelegate)=0
Deletes the specified files.
virtual void WriteMany(WriteManyWriteFileDataDelegate writeFileDataDelegate, WriteManyResultDelegate resultDelegate)=0
Writes the given data to the specified files.
Interface for reading an array or an enumerator. For regular enumerators UndefinedArrayLength is used...
Definition: IRscReadEnumerator.hxx:21
Base interface for all Rsc service interface.
Definition: IRscService.hpp:19
Interface for writing an array or an enumerator. For regular enumerators UndefinedArrayLength is used...
Definition: IRscWriteEnumerator.hxx:23
This class serves as adapter between Rsc streams and streams from Arp::System::Commons::Io,...
Definition: RscStreamAdapter.hpp:20
@ System
System components used by the System, Device, Plc or Io domains.
Traits
This enum is used by several file services to specify the file traits to get or set,...
Definition: Traits.hpp:19
FileSystemError
This enum is used by several file operations.
Definition: FileSystemError.hpp:19
Namespace for classes and interfaces for the Remote Service Call implementation
Root namespace for the PLCnext API