PeanutButter
Loading...
Searching...
No Matches
PeanutButter.FileSystem.IFileSystem Interface Reference

Provides a wrapper around a tree within a filesystem. More...

Inheritance diagram for PeanutButter.FileSystem.IFileSystem:
PeanutButter.FileSystem.LocalFileSystem

Public Member Functions

IEnumerable< string > List (string searchPattern="*")
 List any items within the root of the current filesystem, with an optional search pattern.
IEnumerable< string > ListFiles (string searchPattern="*")
 List files within the root of the current filesystem, with an optional search pattern.
IEnumerable< string > ListFolders (string searchPattern="*")
 List directories within the root of the current filesystem, with an optional search pattern.
IEnumerable< string > ListRecursive (string searchPattern="*")
 List any any items recursively from the root of the current filesystem downward, with an optional search pattern.
IEnumerable< string > ListFilesRecursive (string searchPattern="*")
 List files items recursively from the root of the current filesystem downward, with an optional search pattern.
IEnumerable< string > ListFoldersRecursive (string searchPattern="*")
 List folders items recursively from the root of the current filesystem downward, with an optional search pattern.
string GetCurrentDirectory ()
 Retrieves the current working directory within the filesystem.
void SetCurrentDirectory (string path)
 Set the current working directory within the filesystem.
void Delete (string path)
 Delete a folder or file within the filesystem.
void DeleteRecursive (string path)
 Recursively delete a folder (or nuke a file)
void Copy (string sourcePath)
 Copy the file at the provided sourcePath into the current folder.
void Copy (string sourcePath, string targetPath)
 Copy the file at the source path to the target path.
Stream OpenReader (string path)
 Open a stream-reader to the provided file path.
Stream OpenWriter (string path)
 Open a stream-writer to the provided file path.
Stream Open (string targetPath)
 Open a target path with all options (read-write) without destroying it.
void Move (string source, string target, bool overwrite=false)
 Move a file or.
bool FileExists (string path)
 Test if a file exists.
bool FolderExists (string path)
 Test if a folder exists.
string GetFullPathFor (string relativePath)
 Provides the full local path for the provided relative path.

Detailed Description

Provides a wrapper around a tree within a filesystem.

Member Function Documentation

◆ Copy() [1/2]

void PeanutButter.FileSystem.IFileSystem.Copy ( string sourcePath)

Copy the file at the provided sourcePath into the current folder.

Parameters
sourcePath

Implemented in PeanutButter.FileSystem.LocalFileSystem.

◆ Copy() [2/2]

void PeanutButter.FileSystem.IFileSystem.Copy ( string sourcePath,
string targetPath )

Copy the file at the source path to the target path.

Parameters
sourcePath
targetPath

Implemented in PeanutButter.FileSystem.LocalFileSystem.

◆ Delete()

void PeanutButter.FileSystem.IFileSystem.Delete ( string path)

Delete a folder or file within the filesystem.

Parameters
path

Implemented in PeanutButter.FileSystem.LocalFileSystem.

◆ DeleteRecursive()

void PeanutButter.FileSystem.IFileSystem.DeleteRecursive ( string path)

Recursively delete a folder (or nuke a file)

Parameters
path

Implemented in PeanutButter.FileSystem.LocalFileSystem.

◆ FileExists()

bool PeanutButter.FileSystem.IFileSystem.FileExists ( string path)

Test if a file exists.

Parameters
path
Returns

Implemented in PeanutButter.FileSystem.LocalFileSystem.

◆ FolderExists()

bool PeanutButter.FileSystem.IFileSystem.FolderExists ( string path)

Test if a folder exists.

Parameters
path
Returns

Implemented in PeanutButter.FileSystem.LocalFileSystem.

◆ GetCurrentDirectory()

string PeanutButter.FileSystem.IFileSystem.GetCurrentDirectory ( )

Retrieves the current working directory within the filesystem.

Returns

Implemented in PeanutButter.FileSystem.LocalFileSystem.

◆ GetFullPathFor()

string PeanutButter.FileSystem.IFileSystem.GetFullPathFor ( string relativePath)

Provides the full local path for the provided relative path.

Parameters
relativePath
Returns

Implemented in PeanutButter.FileSystem.LocalFileSystem.

◆ List()

IEnumerable< string > PeanutButter.FileSystem.IFileSystem.List ( string searchPattern = "*")

List any items within the root of the current filesystem, with an optional search pattern.

Parameters
searchPattern
Returns

Implemented in PeanutButter.FileSystem.LocalFileSystem.

◆ ListFiles()

IEnumerable< string > PeanutButter.FileSystem.IFileSystem.ListFiles ( string searchPattern = "*")

List files within the root of the current filesystem, with an optional search pattern.

Parameters
searchPattern
Returns

Implemented in PeanutButter.FileSystem.LocalFileSystem.

◆ ListFilesRecursive()

IEnumerable< string > PeanutButter.FileSystem.IFileSystem.ListFilesRecursive ( string searchPattern = "*")

List files items recursively from the root of the current filesystem downward, with an optional search pattern.

Parameters
searchPattern
Returns

Implemented in PeanutButter.FileSystem.LocalFileSystem.

◆ ListFolders()

IEnumerable< string > PeanutButter.FileSystem.IFileSystem.ListFolders ( string searchPattern = "*")

List directories within the root of the current filesystem, with an optional search pattern.

Parameters
searchPattern
Returns

Implemented in PeanutButter.FileSystem.LocalFileSystem.

◆ ListFoldersRecursive()

IEnumerable< string > PeanutButter.FileSystem.IFileSystem.ListFoldersRecursive ( string searchPattern = "*")

List folders items recursively from the root of the current filesystem downward, with an optional search pattern.

Parameters
searchPattern
Returns

Implemented in PeanutButter.FileSystem.LocalFileSystem.

◆ ListRecursive()

IEnumerable< string > PeanutButter.FileSystem.IFileSystem.ListRecursive ( string searchPattern = "*")

List any any items recursively from the root of the current filesystem downward, with an optional search pattern.

Parameters
searchPattern
Returns

Implemented in PeanutButter.FileSystem.LocalFileSystem.

◆ Move()

void PeanutButter.FileSystem.IFileSystem.Move ( string source,
string target,
bool overwrite = false )

Move a file or.

Parameters
source
target
overwrite

Implemented in PeanutButter.FileSystem.LocalFileSystem.

◆ Open()

Stream PeanutButter.FileSystem.IFileSystem.Open ( string targetPath)

Open a target path with all options (read-write) without destroying it.

Parameters
targetPath
Returns

Implemented in PeanutButter.FileSystem.LocalFileSystem.

◆ OpenReader()

Stream PeanutButter.FileSystem.IFileSystem.OpenReader ( string path)

Open a stream-reader to the provided file path.

Parameters
path
Returns

Implemented in PeanutButter.FileSystem.LocalFileSystem.

◆ OpenWriter()

Stream PeanutButter.FileSystem.IFileSystem.OpenWriter ( string path)

Open a stream-writer to the provided file path.

Parameters
path
Returns

Implemented in PeanutButter.FileSystem.LocalFileSystem.

◆ SetCurrentDirectory()

void PeanutButter.FileSystem.IFileSystem.SetCurrentDirectory ( string path)

Set the current working directory within the filesystem.

Parameters
path

Implemented in PeanutButter.FileSystem.LocalFileSystem.


The documentation for this interface was generated from the following file:
  • source/Utils/PeanutButter.FileSystem/IFileSystem.cs