November Happy Hour will be moved to Thursday December 5th.

Interface IDirectory

Provides methods for creating, moving, and enumerating through directories and subdirectories.

Namespace: EPiServer.Framework.FileSystem
Assembly: EPiServer.Framework.AspNet.dll
Version: 11.20.7
Syntax
public interface IDirectory

Methods

CreateDirectory(String)

Declaration
DirectoryInfo CreateDirectory(string path)
Parameters
Type Name Description
System.String path
Returns
Type Description
System.IO.DirectoryInfo

CreateDirectory(String, DirectorySecurity)

Declaration
DirectoryInfo CreateDirectory(string path, DirectorySecurity directorySecurity)
Parameters
Type Name Description
System.String path
System.Security.AccessControl.DirectorySecurity directorySecurity
Returns
Type Description
System.IO.DirectoryInfo

Delete(String)

Declaration
void Delete(string path)
Parameters
Type Name Description
System.String path

Delete(String, Boolean)

Declaration
void Delete(string path, bool recursive)
Parameters
Type Name Description
System.String path
System.Boolean recursive

Exists(String)

Declaration
bool Exists(string path)
Parameters
Type Name Description
System.String path
Returns
Type Description
System.Boolean

GetAccessControl(String)

Declaration
DirectorySecurity GetAccessControl(string path)
Parameters
Type Name Description
System.String path
Returns
Type Description
System.Security.AccessControl.DirectorySecurity

GetAccessControl(String, AccessControlSections)

Declaration
DirectorySecurity GetAccessControl(string path, AccessControlSections includeSections)
Parameters
Type Name Description
System.String path
System.Security.AccessControl.AccessControlSections includeSections
Returns
Type Description
System.Security.AccessControl.DirectorySecurity

GetCreationTime(String)

Declaration
DateTime GetCreationTime(string path)
Parameters
Type Name Description
System.String path
Returns
Type Description
System.DateTime

GetCreationTimeUtc(String)

Declaration
DateTime GetCreationTimeUtc(string path)
Parameters
Type Name Description
System.String path
Returns
Type Description
System.DateTime

GetCurrentDirectory()

Declaration
string GetCurrentDirectory()
Returns
Type Description
System.String

GetDirectories(String)

Declaration
string[] GetDirectories(string path)
Parameters
Type Name Description
System.String path
Returns
Type Description
System.String[]

GetDirectories(String, String)

Declaration
string[] GetDirectories(string path, string searchPattern)
Parameters
Type Name Description
System.String path
System.String searchPattern
Returns
Type Description
System.String[]

GetDirectories(String, String, SearchOption)

Declaration
string[] GetDirectories(string path, string searchPattern, SearchOption searchOption)
Parameters
Type Name Description
System.String path
System.String searchPattern
System.IO.SearchOption searchOption
Returns
Type Description
System.String[]

GetDirectoryRoot(String)

Declaration
string GetDirectoryRoot(string path)
Parameters
Type Name Description
System.String path
Returns
Type Description
System.String

GetFiles(String)

Declaration
string[] GetFiles(string path)
Parameters
Type Name Description
System.String path
Returns
Type Description
System.String[]

GetFiles(String, String)

Declaration
string[] GetFiles(string path, string searchPattern)
Parameters
Type Name Description
System.String path
System.String searchPattern
Returns
Type Description
System.String[]

GetFiles(String, String, SearchOption)

Declaration
string[] GetFiles(string path, string searchPattern, SearchOption searchOption)
Parameters
Type Name Description
System.String path
System.String searchPattern
System.IO.SearchOption searchOption
Returns
Type Description
System.String[]

GetFileSystemEntries(String)

Declaration
string[] GetFileSystemEntries(string path)
Parameters
Type Name Description
System.String path
Returns
Type Description
System.String[]

GetFileSystemEntries(String, String)

Declaration
string[] GetFileSystemEntries(string path, string searchPattern)
Parameters
Type Name Description
System.String path
System.String searchPattern
Returns
Type Description
System.String[]

GetLastAccessTime(String)

Declaration
DateTime GetLastAccessTime(string path)
Parameters
Type Name Description
System.String path
Returns
Type Description
System.DateTime

GetLastAccessTimeUtc(String)

Declaration
DateTime GetLastAccessTimeUtc(string path)
Parameters
Type Name Description
System.String path
Returns
Type Description
System.DateTime

GetLastWriteTime(String)

Declaration
DateTime GetLastWriteTime(string path)
Parameters
Type Name Description
System.String path
Returns
Type Description
System.DateTime

GetLastWriteTimeUtc(String)

Declaration
DateTime GetLastWriteTimeUtc(string path)
Parameters
Type Name Description
System.String path
Returns
Type Description
System.DateTime

GetLogicalDrives()

Declaration
string[] GetLogicalDrives()
Returns
Type Description
System.String[]

GetParent(String)

Declaration
DirectoryInfo GetParent(string path)
Parameters
Type Name Description
System.String path
Returns
Type Description
System.IO.DirectoryInfo

Move(String, String)

Declaration
void Move(string sourceDirName, string destinationDirName)
Parameters
Type Name Description
System.String sourceDirName
System.String destinationDirName

SetAccessControl(String, DirectorySecurity)

Declaration
void SetAccessControl(string path, DirectorySecurity directorySecurity)
Parameters
Type Name Description
System.String path
System.Security.AccessControl.DirectorySecurity directorySecurity

SetCreationTime(String, DateTime)

Declaration
void SetCreationTime(string path, DateTime creationTime)
Parameters
Type Name Description
System.String path
System.DateTime creationTime

SetCreationTimeUtc(String, DateTime)

Declaration
void SetCreationTimeUtc(string path, DateTime creationTimeUtc)
Parameters
Type Name Description
System.String path
System.DateTime creationTimeUtc

SetCurrentDirectory(String)

Declaration
void SetCurrentDirectory(string path)
Parameters
Type Name Description
System.String path

SetLastAccessTime(String, DateTime)

Declaration
void SetLastAccessTime(string path, DateTime lastAccessTime)
Parameters
Type Name Description
System.String path
System.DateTime lastAccessTime

SetLastAccessTimeUtc(String, DateTime)

Declaration
void SetLastAccessTimeUtc(string path, DateTime lastAccessTimeUtc)
Parameters
Type Name Description
System.String path
System.DateTime lastAccessTimeUtc

SetLastWriteTime(String, DateTime)

Declaration
void SetLastWriteTime(string path, DateTime lastWriteTime)
Parameters
Type Name Description
System.String path
System.DateTime lastWriteTime

SetLastWriteTimeUtc(String, DateTime)

Declaration
void SetLastWriteTimeUtc(string path, DateTime lastWriteTimeUtc)
Parameters
Type Name Description
System.String path
System.DateTime lastWriteTimeUtc

Extension Methods