PLCnext API Documentation 23.6.0.37
IDirectoryService.hpp
1
2//
3// Copyright PHOENIX CONTACT Electronics GmbH
4//
6#pragma once
8#include "Arp/System/Commons/Services/Io/DirectoryServiceProxyFactory.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 IDirectoryService.cs
20
21namespace Arp { namespace System { namespace Commons { namespace Services { namespace Io
22{
23
24using namespace Arp;
25using namespace Arp::System::Rsc::Services;
26
36{
37public: // typedefs
38 using Ptr = std::shared_ptr<IDirectoryService>;
39 using EnumerateFileSystemEntriesResultDelegate = delegate<void(IRscReadEnumerator<FileSystemEntry>&)>;
40 using EnumerateFileSystemTraitsEntriesResultDelegate = delegate<void(IRscReadEnumerator<FileSystemTraitsEntry>&)>;
41
42public: // construction/destruction
44 IDirectoryService(void) = default;
45
46public: // static policy operation
47 static IRscServiceProxyFactory& GetProxyFactory(void);
48
49public: // abstract operations
57 virtual boolean Exists(const RscString<512>& path) = 0;
58
66 virtual FileSystemError Create(const RscString<512>& path) = 0;
67
75 virtual FileSystemError Delete(const RscString<512>& path) = 0;
76
84 virtual FileSystemError Clear(const RscString<512>& path) = 0;
85
97 virtual FileSystemError Move(const RscString<512>& sourcePath, const RscString<512>& destinationPath, boolean clear = false) = 0;
98
110 virtual FileSystemError Copy(const RscString<512>& sourcePath, const RscString<512>& destinationPath, boolean clear = false) = 0;
111
121 virtual void EnumerateFileSystemEntries(const RscString<512>& path, const RscString<512>& searchPattern, boolean recursive, EnumerateFileSystemEntriesResultDelegate resultDelegate) = 0;
122
133 virtual void EnumerateFileSystemTraitsEntries(const RscString<512>& path, const RscString<512>& searchPattern, Traits traits, boolean recursive, EnumerateFileSystemTraitsEntriesResultDelegate resultDelegate) = 0;
134};
135
137// inline methods of class IDirectoryService
138inline IRscServiceProxyFactory& IDirectoryService::GetProxyFactory()
139{
140 return DirectoryServiceProxyFactory::GetInstance();
141}
142
143}}}}} // end of namespace Arp::System::Commons::Services::Io
Provides common file directory operations.
Definition: IDirectoryService.hpp:36
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.
IDirectoryService(void)=default
Constructs an IDirectoryService instance.
virtual FileSystemError Create(const RscString< 512 > &path)=0
Creates the specified directory.
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.
virtual FileSystemError Delete(const RscString< 512 > &path)=0
Deletes the specified directory and its content.
virtual FileSystemError Clear(const RscString< 512 > &path)=0
Removes the content of the specified directory, but does not delete the specified directory itself.
virtual boolean Exists(const RscString< 512 > &path)=0
Checks if the specified directory exists.
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.
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
@ 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