PLCnext API Documentation 23.0.2.9
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
33{
34public: // typedefs
35 using Ptr = std::shared_ptr<IDirectoryService>;
36 using EnumerateFileSystemEntriesResultDelegate = delegate<void(IRscReadEnumerator<FileSystemEntry>&)>;
37 using EnumerateFileSystemTraitsEntriesResultDelegate = delegate<void(IRscReadEnumerator<FileSystemTraitsEntry>&)>;
38
39public: // construction/destruction
41 IDirectoryService(void) = default;
42
43public: // static policy operation
44 static IRscServiceProxyFactory& GetProxyFactory(void);
45
46public: // abstract operations
54 virtual boolean Exists(const RscString<512>& path) = 0;
55
63 virtual FileSystemError Create(const RscString<512>& path) = 0;
64
72 virtual FileSystemError Delete(const RscString<512>& path) = 0;
73
81 virtual FileSystemError Clear(const RscString<512>& path) = 0;
82
94 virtual FileSystemError Move(const RscString<512>& sourcePath, const RscString<512>& destinationPath, boolean clear = false) = 0;
95
107 virtual FileSystemError Copy(const RscString<512>& sourcePath, const RscString<512>& destinationPath, boolean clear = false) = 0;
108
118 virtual void EnumerateFileSystemEntries(const RscString<512>& path, const RscString<512>& searchPattern, boolean recursive, EnumerateFileSystemEntriesResultDelegate resultDelegate) = 0;
119
130 virtual void EnumerateFileSystemTraitsEntries(const RscString<512>& path, const RscString<512>& searchPattern, Traits traits, boolean recursive, EnumerateFileSystemTraitsEntriesResultDelegate resultDelegate) = 0;
131};
132
134// inline methods of class IDirectoryService
135inline IRscServiceProxyFactory& IDirectoryService::GetProxyFactory()
136{
137 return DirectoryServiceProxyFactory::GetInstance();
138}
139
140}}}}} // end of namespace Arp::System::Commons::Services::Io
Provides common file directory operations.
Definition: IDirectoryService.hpp:33
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:19
@ 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