PLCnext API Documentation 23.6.0.37
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
62 virtual boolean Exists(const RscString<512>& path) = 0;
63
71 virtual FileSystemError Create(const RscString<512>& path) = 0;
72
80 virtual FileSystemError Delete(const RscString<512>& path) = 0;
81
89 virtual FileSystemError Clear(const RscString<512>& path) = 0;
90
102 virtual FileSystemError Move(const RscString<512>& sourcePath, const RscString<512>& destinationPath, boolean clear = false) = 0;
103
115 virtual FileSystemError Copy(const RscString<512>& sourcePath, const RscString<512>& destinationPath, boolean clear = false) = 0;
116
126 virtual void EnumerateFileSystemEntries(const RscString<512>& path, const RscString<512>& searchPattern, boolean recursive, EnumerateFileSystemEntriesResultDelegate resultDelegate) = 0;
127
138 virtual void EnumerateFileSystemTraitsEntries(const RscString<512>& path, const RscString<512>& searchPattern, Traits traits, boolean recursive, EnumerateFileSystemTraitsEntriesResultDelegate resultDelegate) = 0;
139
147 virtual void ExistsMany(ExistsManyPathsDelegate pathsDelegate, ExistsManyResultDelegate resultDelegate) = 0;
148
156 virtual void CreateMany(CreateManyPathsDelegate pathsDelegate, CreateManyResultDelegate resultDelegate) = 0;
157
165 virtual void DeleteMany(DeleteManyPathsDelegate pathsDelegate, DeleteManyResultDelegate resultDelegate) = 0;
166
174 virtual void ClearMany(ClearManyPathsDelegate pathsDelegate, ClearManyResultDelegate resultDelegate) = 0;
175};
176
178// inline methods of class IDirectoryService2
179inline IRscServiceProxyFactory& IDirectoryService2::GetProxyFactory()
180{
181 return DirectoryService2ProxyFactory::GetInstance();
182}
183
184}}}}} // end of namespace Arp::System::Commons::Services::Io
Provides common file directory operations for several directories in a single call.
Definition: IDirectoryService2.hpp:33
virtual FileSystemError Delete(const RscString< 512 > &path)=0
Deletes the specified directory and its content.
virtual FileSystemError Move(const RscString< 512 > &sourcePath, const RscString< 512 > &destinationPath, boolean clear=false)=0
Moves the specified directory and its content to the given new location.
IDirectoryService2(void)=default
Constructs an IDirectoryService2 instance.
virtual void EnumerateFileSystemEntries(const RscString< 512 > &path, const RscString< 512 > &searchPattern, boolean recursive, EnumerateFileSystemEntriesResultDelegate resultDelegate)=0
Enumerates all files and subdirectories of the specified directory.
virtual void EnumerateFileSystemTraitsEntries(const RscString< 512 > &path, const RscString< 512 > &searchPattern, Traits traits, boolean recursive, EnumerateFileSystemTraitsEntriesResultDelegate resultDelegate)=0
Enumerates all files and subdirectories of the specified directory.
virtual void ExistsMany(ExistsManyPathsDelegate pathsDelegate, ExistsManyResultDelegate resultDelegate)=0
Checks if the specified directories exist.
virtual FileSystemError Clear(const RscString< 512 > &path)=0
Removes the content of the specified directory, but does not delete the specified directory itself.
virtual FileSystemError Create(const RscString< 512 > &path)=0
Creates the specified directory.
virtual boolean Exists(const RscString< 512 > &path)=0
Checks if the specified directory exists.
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 FileSystemError Copy(const RscString< 512 > &sourcePath, const RscString< 512 > &destinationPath, boolean clear=false)=0
Copies the specified directory and its content to the given new location.
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:20
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