PLCnext API Documentation 23.0.2.9
IDirectoryService2.hpp
1
2//
3// Copyright PHOENIX CONTACT Electronics GmbH
4//
6#pragma once
8#include "Arp/System/Commons/Services/Io/DirectoryService2ProxyFactory.hpp"
9#include "Arp/System/Commons/Services/Io/FileSystemEntry.hpp"
10#include "Arp/System/Commons/Services/Io/FileSystemError.hpp"
11#include "Arp/System/Commons/Services/Io/FileSystemTraitsEntry.hpp"
12#include "Arp/System/Commons/Services/Io/Traits.hpp"
13#include "Arp/System/Core/delegate.hxx"
14#include "Arp/System/Rsc/Services/IRscReadEnumerator.hxx"
15#include "Arp/System/Rsc/Services/IRscService.hpp"
16#include "Arp/System/Rsc/Services/IRscWriteEnumerator.hxx"
17#include "Arp/System/Rsc/Services/RscString.hxx"
18
19// DO NOT MODIFY THIS FILE, THIS FILE IS AUTOGENERATED BY IDirectoryService2.cs
20
21namespace Arp { namespace System { namespace Commons { namespace Services { namespace Io
22{
23
24using namespace Arp;
25using namespace Arp::System::Rsc::Services;
26
33{
34public: // typedefs
35 using Ptr = std::shared_ptr<IDirectoryService2>;
36 using ClearManyPathsDelegate = delegate<void(IRscWriteEnumerator<RscString<512>>&)>;
37 using ClearManyResultDelegate = delegate<void(IRscReadEnumerator<FileSystemError>&)>;
38 using CreateManyPathsDelegate = delegate<void(IRscWriteEnumerator<RscString<512>>&)>;
39 using CreateManyResultDelegate = delegate<void(IRscReadEnumerator<FileSystemError>&)>;
40 using DeleteManyPathsDelegate = delegate<void(IRscWriteEnumerator<RscString<512>>&)>;
41 using DeleteManyResultDelegate = delegate<void(IRscReadEnumerator<FileSystemError>&)>;
42 using EnumerateFileSystemEntriesResultDelegate = delegate<void(IRscReadEnumerator<FileSystemEntry>&)>;
43 using EnumerateFileSystemTraitsEntriesResultDelegate = delegate<void(IRscReadEnumerator<FileSystemTraitsEntry>&)>;
44 using ExistsManyPathsDelegate = delegate<void(IRscWriteEnumerator<RscString<512>>&)>;
45 using ExistsManyResultDelegate = delegate<void(IRscReadEnumerator<boolean>&)>;
46
47public: // construction/destruction
49 IDirectoryService2(void) = default;
50
51public: // static policy operation
52 static IRscServiceProxyFactory& GetProxyFactory(void);
53
54public: // abstract operations
55 virtual boolean Exists(const RscString<512>& path) = 0;
56 virtual FileSystemError Create(const RscString<512>& path) = 0;
57 virtual FileSystemError Delete(const RscString<512>& path) = 0;
58 virtual FileSystemError Clear(const RscString<512>& path) = 0;
59 virtual FileSystemError Move(const RscString<512>& sourcePath, const RscString<512>& destinationPath, boolean clear = false) = 0;
60 virtual FileSystemError Copy(const RscString<512>& sourcePath, const RscString<512>& destinationPath, boolean clear = false) = 0;
61 virtual void EnumerateFileSystemEntries(const RscString<512>& path, const RscString<512>& searchPattern, boolean recursive, EnumerateFileSystemEntriesResultDelegate resultDelegate) = 0;
62 virtual void EnumerateFileSystemTraitsEntries(const RscString<512>& path, const RscString<512>& searchPattern, Traits traits, boolean recursive, EnumerateFileSystemTraitsEntriesResultDelegate resultDelegate) = 0;
63
71 virtual void ExistsMany(ExistsManyPathsDelegate pathsDelegate, ExistsManyResultDelegate resultDelegate) = 0;
72
80 virtual void CreateMany(CreateManyPathsDelegate pathsDelegate, CreateManyResultDelegate resultDelegate) = 0;
81
89 virtual void DeleteMany(DeleteManyPathsDelegate pathsDelegate, DeleteManyResultDelegate resultDelegate) = 0;
90
98 virtual void ClearMany(ClearManyPathsDelegate pathsDelegate, ClearManyResultDelegate resultDelegate) = 0;
99};
100
102// inline methods of class IDirectoryService2
103inline IRscServiceProxyFactory& IDirectoryService2::GetProxyFactory()
104{
105 return DirectoryService2ProxyFactory::GetInstance();
106}
107
108}}}}} // end of namespace Arp::System::Commons::Services::Io
Provides common file directory operations for several directories in a single call.
Definition: IDirectoryService2.hpp:33
IDirectoryService2(void)=default
Constructs an IDirectoryService2 instance.
virtual void ExistsMany(ExistsManyPathsDelegate pathsDelegate, ExistsManyResultDelegate resultDelegate)=0
Checks if the specified directories exist.
virtual void CreateMany(CreateManyPathsDelegate pathsDelegate, CreateManyResultDelegate resultDelegate)=0
Creates the specified directories.
virtual void DeleteMany(DeleteManyPathsDelegate pathsDelegate, DeleteManyResultDelegate resultDelegate)=0
Deletes the specified directories.
virtual void ClearMany(ClearManyPathsDelegate pathsDelegate, ClearManyResultDelegate resultDelegate)=0
Clears the specified directories.
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
@ 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