PLCnext API Documentation 26.6.0.38
Public Types | Public Member Functions | Static Public Member Functions | List of all members
Arp::System::Commons::Services::Io::IDirectoryService2 Class Referenceabstract

Provides common file directory operations for several directories in a single call. More...

#include <IDirectoryService2.hpp>

Inheritance diagram for Arp::System::Commons::Services::Io::IDirectoryService2:
Inheritance graph

Public Types

using Ptr = std::shared_ptr< IDirectoryService2 >
 
using ClearManyPathsDelegate = delegate< void(IRscWriteEnumerator< RscString< 512 > > &)>
 
using ClearManyResultDelegate = delegate< void(IRscReadEnumerator< FileSystemError > &)>
 
using CreateManyPathsDelegate = delegate< void(IRscWriteEnumerator< RscString< 512 > > &)>
 
using CreateManyResultDelegate = delegate< void(IRscReadEnumerator< FileSystemError > &)>
 
using DeleteManyPathsDelegate = delegate< void(IRscWriteEnumerator< RscString< 512 > > &)>
 
using DeleteManyResultDelegate = delegate< void(IRscReadEnumerator< FileSystemError > &)>
 
using ExistsManyPathsDelegate = delegate< void(IRscWriteEnumerator< RscString< 512 > > &)>
 
using ExistsManyResultDelegate = delegate< void(IRscReadEnumerator< boolean > &)>
 
- Public Types inherited from Arp::System::Commons::Services::Io::IDirectoryService
using Ptr = std::shared_ptr< IDirectoryService >
 
using EnumerateFileSystemEntriesResultDelegate = delegate< void(IRscReadEnumerator< FileSystemEntry > &)>
 
using EnumerateFileSystemTraitsEntriesResultDelegate = delegate< void(IRscReadEnumerator< FileSystemTraitsEntry > &)>
 
- Public Types inherited from Arp::Base::Rsc::Commons::IRscService
using Ptr = std::shared_ptr< IRscService >
 The shared_ptr type of IRscService.
 

Public Member Functions

 IDirectoryService2 (void)=default
 Constructs an IDirectoryService2 instance.
 
virtual void ExistsMany (ExistsManyPathsDelegate pathsDelegate, ExistsManyResultDelegate resultDelegate)=0
 Checks if the specified directories exist. More...
 
virtual void CreateMany (CreateManyPathsDelegate pathsDelegate, CreateManyResultDelegate resultDelegate)=0
 Creates the specified directories. More...
 
virtual void DeleteMany (DeleteManyPathsDelegate pathsDelegate, DeleteManyResultDelegate resultDelegate)=0
 Deletes the specified directories. More...
 
virtual void ClearMany (ClearManyPathsDelegate pathsDelegate, ClearManyResultDelegate resultDelegate)=0
 Clears the specified directories. More...
 
- Public Member Functions inherited from Arp::System::Commons::Services::Io::IDirectoryService
 IDirectoryService (void)=default
 Constructs an IDirectoryService instance.
 
virtual boolean Exists (const RscString< 512 > &path)=0
 Checks if the specified directory exists. More...
 
virtual FileSystemError Create (const RscString< 512 > &path)=0
 Creates the specified directory. More...
 
virtual FileSystemError Delete (const RscString< 512 > &path)=0
 Deletes the specified directory and its content. More...
 
virtual FileSystemError Clear (const RscString< 512 > &path)=0
 Removes the content of the specified directory, but does not delete the specified directory itself. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
- Public Member Functions inherited from Arp::Base::Rsc::Commons::IRscService
 IRscService (void)=default
 The default constructor.
 
 IRscService (const IRscService &arg)=delete
 The deleted copy constructor. More...
 
 IRscService (IRscService &&arg) noexcept=default
 The default move constructor. More...
 
IRscServiceoperator= (const IRscService &arg)=delete
 The deleted assignment operator. More...
 
IRscServiceoperator= (IRscService &&arg) noexcept=default
 The default move-assignment operator. More...
 
virtual ~IRscService (void)=default
 Destructs this instance and frees all resources.
 

Static Public Member Functions

static IRscServiceProxyFactoryGetProxyFactory (void)
 
- Static Public Member Functions inherited from Arp::System::Commons::Services::Io::IDirectoryService
static IRscServiceProxyFactoryGetProxyFactory (void)
 
- Static Public Member Functions inherited from Arp::Base::Rsc::Commons::IRscService
static IRscServiceProxyFactoryGetProxyFactory (void)
 Returns a reference to service proxy factory to create a proxy instance of this service. More...
 

Detailed Description

Provides common file directory operations for several directories in a single call.

The path separator is always '/'.

This service is defined in library Arp.System.Commons.Services.

Realtime Usage: This API call does not have to be deterministic in runtime behaviour, so an asynchronous execution should be considered.

Consider the following common rule when using RSC services that provide arrays or enumerators as return values or out arguments: It is always required to completely read all items from these resulting lists or enumerators.

Member Function Documentation

◆ ClearMany()

virtual void Arp::System::Commons::Services::Io::IDirectoryService2::ClearMany ( ClearManyPathsDelegate  pathsDelegate,
ClearManyResultDelegate  resultDelegate 
)
pure virtual

Clears the specified directories.

Parameters
pathsThe directory paths to clear.
Returns
A Arp.System.Commons.Services.Io.FileSystemError array where each element corresponds the related element in paths . The element value isArp.System.Commons.Services.Io.FileSystemError.None, if the directory could be cleared, otherwise the appropiate error info.

◆ CreateMany()

virtual void Arp::System::Commons::Services::Io::IDirectoryService2::CreateMany ( CreateManyPathsDelegate  pathsDelegate,
CreateManyResultDelegate  resultDelegate 
)
pure virtual

Creates the specified directories.

Parameters
pathsThe directory paths to create.
Returns
A Arp.System.Commons.Services.Io.FileSystemError array where each element corresponds the related element in paths . The element value isArp.System.Commons.Services.Io.FileSystemError.None, if the directory could be created, otherwise the appropiate error info.

◆ DeleteMany()

virtual void Arp::System::Commons::Services::Io::IDirectoryService2::DeleteMany ( DeleteManyPathsDelegate  pathsDelegate,
DeleteManyResultDelegate  resultDelegate 
)
pure virtual

Deletes the specified directories.

Parameters
pathsThe directory paths to delete.
Returns
A Arp.System.Commons.Services.Io.FileSystemError array where each element corresponds the related element in paths . The element value isArp.System.Commons.Services.Io.FileSystemError.None, if the directory could be deleted, otherwise the appropiate error info.

◆ ExistsMany()

virtual void Arp::System::Commons::Services::Io::IDirectoryService2::ExistsMany ( ExistsManyPathsDelegate  pathsDelegate,
ExistsManyResultDelegate  resultDelegate 
)
pure virtual

Checks if the specified directories exist.

Parameters
pathsThe paths of the directories to check.
Returns
A bool array where each element corresponds the related element in paths . The element value is true, if the directory exists, otherwise false.

The documentation for this class was generated from the following file: