OPC Studio User's Guide and Reference
GetDirectoryContents2 Method (MappedFileProvider)



OpcLabs.BaseLib Assembly > OpcLabs.BaseLib.Extensions.FileProviders Namespace > MappedFileProvider Class : GetDirectoryContents2 Method
Relative path that identifies the directory.

The value of this parameter can be null (Nothing in Visual Basic).

Obtains a directory contents at the given path.
Syntax
'Declaration
 
Public Function GetDirectoryContents2( _
   ByVal subpath As String _
) As IDirectoryContents2
'Usage
 
Dim instance As MappedFileProvider
Dim subpath As String
Dim value As IDirectoryContents2
 
value = instance.GetDirectoryContents2(subpath)
public IDirectoryContents2 GetDirectoryContents2( 
   string subpath
)
public:
IDirectoryContents2^ GetDirectoryContents2( 
   String^ subpath
) 

Parameters

subpath
Relative path that identifies the directory.

The value of this parameter can be null (Nothing in Visual Basic).

Return Value

Returns the contents of the directory.

This method never returns null (Nothing in Visual Basic).

Remarks

For Microsoft.Extensions.FileProviders.IDirectoryContents, IDirectory2, IDirectoryContents2, IWritableDirectory and IWritableDirectoryContents, relative paths are based on the directory itself; absolute paths are based on the root directory of the file provider. Notice the difference from Microsoft.Extensions.FileProviders.IFileInfo, IFileInfo2 and IWritableFileInfo, where relative paths are based on the directory where the file is located.

This method or property does not throw any exceptions, aside from execution exceptions such as System.Threading.ThreadAbortException or System.OutOfMemoryException.

Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also