C# Класс Phantom.Core.Builtins.IOFunctions

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
cp ( string source, string destination ) : void

Copies a file from one location to another.

exec ( string command ) : void
exec ( string command, IDictionary options ) : void
exec ( string command, string args ) : void

Executes the specified program with the specified arguments

exec ( string command, string args, IDictionary options ) : void

Executes the specified program with the specified arguments. You can also specify the working directory of the command by providing the hash option "WorkingDir"

mkdir ( string path ) : void

Creates a directory if it does not exist.

rm ( FileSystemInfo file ) : void

Deletes a file or directory

rm ( string path ) : void

Deletes a file or directory

Приватные методы

Метод Описание
DeleteDirectory ( string path ) : void
DeleteFile ( string path ) : void
SetAttributesNormal ( DirectoryInfo dir ) : void

The Delete() method will fail with UnauthorizedAccessException if any files in the directory tree have the read-only flag. Delete() cannot delete anything with read-only flag even if the user running the application has priviliges to delete these files.

rmdir ( string path ) : void

Описание методов

cp() публичный статический Метод

Copies a file from one location to another.
public static cp ( string source, string destination ) : void
source string Source file
destination string Destination
Результат void

exec() публичный статический Метод

public static exec ( string command ) : void
command string
Результат void

exec() публичный статический Метод

public static exec ( string command, IDictionary options ) : void
command string
options IDictionary
Результат void

exec() публичный статический Метод

Executes the specified program with the specified arguments
public static exec ( string command, string args ) : void
command string /// The command to execute ///
args string Additional args
Результат void

exec() публичный статический Метод

Executes the specified program with the specified arguments. You can also specify the working directory of the command by providing the hash option "WorkingDir"
public static exec ( string command, string args, IDictionary options ) : void
command string /// The command to execute ///
args string Additional args
options IDictionary /// A hash of options to set on the process (like WorkingDir) ///
Результат void

mkdir() публичный статический Метод

Creates a directory if it does not exist.
public static mkdir ( string path ) : void
path string
Результат void

rm() публичный статический Метод

Deletes a file or directory
public static rm ( FileSystemInfo file ) : void
file System.IO.FileSystemInfo /// File or directory to delete ///
Результат void

rm() публичный статический Метод

Deletes a file or directory
public static rm ( string path ) : void
path string /// File or directory to delete ///
Результат void