Shell Module
Shell-like functions. Similar to Ruby's FileUtils.
Types
Type | Description |
Functions and values
Function or value | Description |
Full Usage:
Shell.appendTextFiles newFileName files
Parameters:
string
-
The target FileName.
files : seq<string>
-
The original FileNames as a sequence.
|
|
Full Usage:
Shell.appendTextFilesWithEncoding encoding newFileName files
Parameters:
Encoding
-
The encoding to use.
newFileName : string
-
The target FileName.
files : seq<string>
-
The original FileNames as a sequence.
|
|
Full Usage:
Shell.cd path
Parameters:
string
-
The path to directory to change to
|
|
Full Usage:
Shell.chdir path
Parameters:
string
-
The path to directory to change to
|
|
Full Usage:
Shell.cleanDir path
Parameters:
string
-
The directory path
|
|
Full Usage:
Shell.cleanDirs dirs
Parameters:
seq<string>
-
The directories to clean
|
|
Full Usage:
Shell.compareFiles delete originalFileName compareFileName
Parameters:
bool
-
Mark if to delete same files or not
originalFileName : string
-
Original directory to use in comparision
compareFileName : string
-
Other directory to use in comparision
Returns: bool
|
|
Full Usage:
Shell.copy target files
Parameters:
string
-
The target directory.
files : seq<string>
-
The original file names as a sequence.
|
|
Full Usage:
Shell.copyCached target cacheDir files
Parameters:
string
-
The target FileName.
cacheDir : string
-
The cache directory.
files : seq<string>
-
The original files.
Returns: string list
|
Copies the files from a cache folder. If the files are not cached or the original files have a different write time the cache will be refreshed.
|
Full Usage:
Shell.copyDir target source filterFile
Parameters:
string
-
The target directory
source : string
-
The source directory
filterFile : string -> bool
-
A file filter predicate
|
|
Full Usage:
Shell.copyFile target fileName
Parameters:
string
-
The target directory or file.
fileName : string
-
The FileName.
|
|
Full Usage:
Shell.copyFileIntoSubFolder target fileName
Parameters:
string
-
The target directory
fileName : string
-
The FileName.
|
|
Full Usage:
Shell.copyFileWithSubfolder baseDir target fileName
Parameters:
string
-
The base directory.
target : string
-
The target directory.
fileName : string
-
The file name.
|
Copies a single file to the target folder preserving the folder structure starting from the specified base folder.
|
Full Usage:
Shell.copyFiles target files
Parameters:
string
-
The target directory.
files : seq<string>
-
The original file names.
|
|
Full Usage:
Shell.copyFilesWithSubFolder targetDir files
Parameters:
string
-
The target directory.
files : IGlobbingPattern
-
The file names.
|
Copies the given glob-matches into another directory by leaving relative paths in place based on the globbing base-directory
Example
|
Full Usage:
Shell.copyRecursive dir outputDir overWrite
Parameters:
string
-
Directory path to copy
outputDir : string
-
The target directory to copy to
overWrite : bool
-
Flag to overwrite any matching files/directories or not
Returns: string list
|
|
Full Usage:
Shell.copyRecursive2 method dir outputDir
Parameters:
CopyRecursiveMethod
-
The method to decide which files get copied
dir : string
-
The source directory.
outputDir : string
-
The target directory.
Returns: string list
|
|
Full Usage:
Shell.copyRecursiveTo overWrite outputDir dir
Parameters:
bool
-
Flag to overwrite any matching files/directories or not
outputDir : string
-
The target directory to copy to
dir : string
-
Directory path to copy
Returns: string list
Modifiers: inline |
|
Full Usage:
Shell.copyTo target files
Parameters:
string
-
The target directory.
files : seq<string>
-
The original file names as a sequence.
|
|
Full Usage:
Shell.cp src dest
Parameters:
string
-
The source
dest : string
-
The destination
|
|
Full Usage:
Shell.cp_r src dest
Parameters:
string
-
The source
dest : string
-
The destination
|
|
Full Usage:
Shell.deleteDir dir
Parameters:
string
-
The directory path to delete
|
|
Full Usage:
Shell.deleteDirs dirs
Parameters:
seq<string>
-
The directories to delete
|
|
Full Usage:
Shell.generatePatch lastReleaseDir patchDir srcFiles
Parameters:
string
-
The directory of the last release.
patchDir : string
-
The target directory.
srcFiles : seq<string>
-
The source files.
|
|
Full Usage:
Shell.generatePatchWithFindOldFileFunction lastReleaseDir patchDir srcFiles findOldFileF
Parameters:
string
-
The directory of the last release
patchDir : string
-
The target directory
srcFiles : seq<string>
-
The source files
findOldFileF : string -> string -> string
-
A function which finds the old file
|
|
Full Usage:
Shell.mkdir path
Parameters:
string
-
The path to create directory in
|
|
Full Usage:
Shell.moveFile target fileName
Parameters:
string
-
The target directory.
fileName : string
-
The FileName.
|
Moves a single file to the target and overwrites the existing file.
If
|
Full Usage:
Shell.mv src dest
Parameters:
string
-
The source
dest : string
-
The destination
|
|
Full Usage:
Shell.popd ()
Parameters:
unit
|
|
Full Usage:
Shell.pushd path
Parameters:
string
-
The path to directory to push
|
|
Full Usage:
Shell.pwd ()
Parameters:
unit
Returns: string
|
|
Full Usage:
Shell.regexReplaceInFileWithEncoding pattern replacement encoding file
Parameters:
string
-
The string to search for a match
replacement : string
-
The replacement string
encoding : Encoding
-
The encoding to use when reading and writing the file
file : string
-
The path of the file to process
|
|
Full Usage:
Shell.regexReplaceInFilesWithEncoding pattern replacement encoding files
Parameters:
string
-
The string to search for a match
replacement : string
-
The replacement string
encoding : Encoding
-
The encoding to use when reading and writing the files
files : seq<string>
-
The paths of the files to process
|
|
Full Usage:
Shell.rename target fileName
Parameters:
string
-
The target file or directory name.
fileName : string
-
The original file or directory name.
|
|
Full Usage:
Shell.replaceInFiles replacements files
Parameters:
seq<string * string>
-
A sequence of tuples with the patterns and the replacements.
files : seq<string>
-
The files to process.
|
|
Full Usage:
Shell.rm fileName
Parameters:
string
-
The file name to delete
|
|
Full Usage:
Shell.rm_rf f
Parameters:
string
-
The file name to delete
|
|
Full Usage:
Shell.silentCopy target files
Parameters:
string
-
The target directory.
files : seq<string>
-
List of files to copy.
|
|
Full Usage:
Shell.testDir path
Parameters:
string
-
Directory path to check
Returns: bool
|
|
Full Usage:
Shell.testFile path
Parameters:
string
-
Directory path to check
Returns: bool
|
|
Full Usage:
Shell.writeConfigFile configFileName parameters
Parameters:
string
-
The configuration file name
parameters : seq<'a * 'b>
-
The parameters to write to config file
|
|