C# Class Phantom.Core.Builtins.IOFunctions

Afficher le fichier Open project: JeremySkinner/Phantom Class Usage Examples

Méthodes publiques

Méthode Description
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

Private Methods

Méthode Description
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

Method Details

cp() public static méthode

Copies a file from one location to another.
public static cp ( string source, string destination ) : void
source string Source file
destination string Destination
Résultat void

exec() public static méthode

public static exec ( string command ) : void
command string
Résultat void

exec() public static méthode

public static exec ( string command, IDictionary options ) : void
command string
options IDictionary
Résultat void

exec() public static méthode

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
Résultat void

exec() public static méthode

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) ///
Résultat void

mkdir() public static méthode

Creates a directory if it does not exist.
public static mkdir ( string path ) : void
path string
Résultat void

rm() public static méthode

Deletes a file or directory
public static rm ( FileSystemInfo file ) : void
file System.IO.FileSystemInfo /// File or directory to delete ///
Résultat void

rm() public static méthode

Deletes a file or directory
public static rm ( string path ) : void
path string /// File or directory to delete ///
Résultat void