Class DirectoryReference
Implementation of the IDirectoryReference interface.
Inheritance
System.Object
DirectoryReference
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: FellowOakDicom.IO
Assembly: fo-dicom.core.dll
Syntax
public class DirectoryReference : IDirectoryReference
Constructors
DirectoryReference(String)
Initializes a DirectoryReference object.
Declaration
public DirectoryReference(string directoryName)
Parameters
Type | Name | Description |
---|---|---|
System.String | directoryName | Name of the directory. |
Properties
Exists
Gets whether the directory exists or not.
Declaration
public bool Exists { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Name
Path name of the current directory.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
Create()
Create the directory path.
Declaration
public void Create()
EnumerateDirectoryNames()
Gets the names of the sub-directories in the current directory.
Declaration
public IEnumerable<string> EnumerateDirectoryNames()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> | Names of the sub-directories in the current directory. |
EnumerateFileNames(String)
Gets the file names of the files in the current directory.
Declaration
public IEnumerable<string> EnumerateFileNames(string searchPattern = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | searchPattern | File search pattern; if null or empty all files in the directory should be returned. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> | File names of the files in the current directory. |