C# 클래스 DevUtils.Io.IoDirectoryUtils

The IoDirectoryUtils type provides an implementation of the IIoDirectoryUtils interface that provides utility methods for common I/O directory operations.

Base project reference: https://github.com/cjaehnen/OpenLib.Utils

상속: IIoDirectoryUtils
파일 보기 프로젝트 열기: jornfilho/.net-Dev-Utils 1 사용 예제들

공개 메소드들

메소드 설명
CopyDirectory ( string sourcePath, string targetPath ) : bool

Copies the specified source directory to the target path.

CreateDirectory ( string path ) : bool

Creates the specified directory if it does not exist.

DeleteDirectory ( string path ) : bool

Deletes the specified directory if it exists.

Recursively deletes all sub directories and files in the specified directory.

DeleteDirectoryContents ( string path ) : bool

Deletes all files and subdirectories in the specified directory.

DirectoryExists ( string path ) : bool

Gets a value indicating if the specified directory exists.

GetCountOfSubdirectories ( string path ) : int

Gets a count indicating the number of subtirectories in the specified directory.

GetDirectoryPermission ( string path ) : IList

Gets a directory permissions list

GetParentDirectory ( string path ) : DirectoryInfo

Get parent directory if exists

IsDirectory ( string path ) : bool

Gets a value indicating if the specified path is a directory.

SetDirectoryPermission ( string path, FileSystemRights permission ) : bool

Set a directory permission

SetDirectoryPermissions ( string path, FileSystemRights permissions ) : bool

Set a directory permission list

메소드 상세

CopyDirectory() 공개 메소드

Copies the specified source directory to the target path.
public CopyDirectory ( string sourcePath, string targetPath ) : bool
sourcePath string The path to the source directory.
targetPath string The path to the target directory.
리턴 bool

CreateDirectory() 공개 메소드

Creates the specified directory if it does not exist.
public CreateDirectory ( string path ) : bool
path string The path to the directory to create.
리턴 bool

DeleteDirectory() 공개 메소드

Deletes the specified directory if it exists.
Recursively deletes all sub directories and files in the specified directory.
public DeleteDirectory ( string path ) : bool
path string The path to the directory to delete.
리턴 bool

DeleteDirectoryContents() 공개 메소드

Deletes all files and subdirectories in the specified directory.
public DeleteDirectoryContents ( string path ) : bool
path string The path to the directory.
리턴 bool

DirectoryExists() 공개 메소드

Gets a value indicating if the specified directory exists.
public DirectoryExists ( string path ) : bool
path string The path to the directory.
리턴 bool

GetCountOfSubdirectories() 공개 메소드

Gets a count indicating the number of subtirectories in the specified directory.
public GetCountOfSubdirectories ( string path ) : int
path string The path to the directory.
리턴 int

GetDirectoryPermission() 공개 메소드

Gets a directory permissions list
public GetDirectoryPermission ( string path ) : IList
path string The path to the directory.
리턴 IList

GetParentDirectory() 공개 메소드

Get parent directory if exists
public GetParentDirectory ( string path ) : DirectoryInfo
path string Directory path.
리턴 System.IO.DirectoryInfo

IsDirectory() 공개 메소드

Gets a value indicating if the specified path is a directory.
public IsDirectory ( string path ) : bool
path string The path to validate as a directory.
리턴 bool

SetDirectoryPermission() 공개 메소드

Set a directory permission
public SetDirectoryPermission ( string path, FileSystemRights permission ) : bool
path string The path to the directory.
permission FileSystemRights Permission to set on directory.
리턴 bool

SetDirectoryPermissions() 공개 메소드

Set a directory permission list
public SetDirectoryPermissions ( string path, FileSystemRights permissions ) : bool
path string The path to the directory.
permissions FileSystemRights Permissions to set on directory.
리턴 bool