C# Class VersionOne.ServiceHost.Core.FileSys

Datei anzeigen Open project: versionone/VersionOne.ServiceHost.Core

Public Methods

Method Description
CommitFile ( string backup ) : void

Deletes backup information from SafeCopyFile

CommitFolder ( string backup ) : void
CopyFile ( string sourcefile, string destfile ) : void
CopyFolder ( string sourcefolder, string destfolder ) : void
CreateFolder ( string folder ) : void
DeleteEmptyFolder ( string filename ) : void
DeleteFile ( string file ) : void
DeleteFile ( string file, bool allowDelay ) : void
DeleteFolder ( string folder ) : void
DeleteFolder ( string folder, bool allowDelay ) : void
EntrySize ( string fileordir ) : int
FileInUse ( string path ) : bool
FolderInUse ( string folder ) : bool
GetFileVersion ( string filename ) : System.Version
GetFiles ( string foldername, string searchpattern, bool recurse ) : string[]
IsSourceFileNewer ( string source, string dest ) : bool

Checks if a source file is newer than a destination file. Uses assembly version if available, then falls back to file time.

MoveFile ( string sourcefile, string destfile ) : void
MoveFolder ( string sourcefolder, string destfolder ) : void
ReadTextFile ( string filename ) : string
RollbackFile ( string destfile, string backup ) : void

Restores a file created by SafeCopyFile

RollbackFolder ( string destfolder, string backup ) : void
SafeCopyFile ( string sourcefile, string destfile ) : string

Copies a file. If the destination already exists, rename it.

SafeCopyFolder ( string sourcefolder, string destfolder ) : string
TempName ( string basename ) : string
Touch ( string path ) : void

Private Methods

Method Description
GetFilesRecursive ( string foldername, string searchpattern, ArrayList filenames ) : void
InternalDeleteFile ( string file, bool allowDelay ) : void
InternalDeleteFolder ( string folder, bool allowDelay ) : void
MoveFileEx ( string source, string dest, uint flags ) : bool

Method Details

CommitFile() public static method

Deletes backup information from SafeCopyFile
public static CommitFile ( string backup ) : void
backup string Returned backup name from original SafeCopyFile call
return void

CommitFolder() public static method

public static CommitFolder ( string backup ) : void
backup string
return void

CopyFile() public static method

public static CopyFile ( string sourcefile, string destfile ) : void
sourcefile string
destfile string
return void

CopyFolder() public static method

public static CopyFolder ( string sourcefolder, string destfolder ) : void
sourcefolder string
destfolder string
return void

CreateFolder() public static method

public static CreateFolder ( string folder ) : void
folder string
return void

DeleteEmptyFolder() public static method

public static DeleteEmptyFolder ( string filename ) : void
filename string
return void

DeleteFile() public static method

public static DeleteFile ( string file ) : void
file string
return void

DeleteFile() public static method

public static DeleteFile ( string file, bool allowDelay ) : void
file string
allowDelay bool
return void

DeleteFolder() public static method

public static DeleteFolder ( string folder ) : void
folder string
return void

DeleteFolder() public static method

public static DeleteFolder ( string folder, bool allowDelay ) : void
folder string
allowDelay bool
return void

EntrySize() public static method

public static EntrySize ( string fileordir ) : int
fileordir string
return int

FileInUse() public static method

public static FileInUse ( string path ) : bool
path string
return bool

FolderInUse() public static method

public static FolderInUse ( string folder ) : bool
folder string
return bool

GetFileVersion() public static method

public static GetFileVersion ( string filename ) : System.Version
filename string
return System.Version

GetFiles() public static method

public static GetFiles ( string foldername, string searchpattern, bool recurse ) : string[]
foldername string
searchpattern string
recurse bool
return string[]

IsSourceFileNewer() public static method

Checks if a source file is newer than a destination file. Uses assembly version if available, then falls back to file time.
public static IsSourceFileNewer ( string source, string dest ) : bool
source string
dest string
return bool

MoveFile() public static method

public static MoveFile ( string sourcefile, string destfile ) : void
sourcefile string
destfile string
return void

MoveFolder() public static method

public static MoveFolder ( string sourcefolder, string destfolder ) : void
sourcefolder string
destfolder string
return void

ReadTextFile() public static method

public static ReadTextFile ( string filename ) : string
filename string
return string

RollbackFile() public static method

Restores a file created by SafeCopyFile
public static RollbackFile ( string destfile, string backup ) : void
destfile string Destination file from original SafeCopyFile call
backup string Returned backup name from original SafeCopyFile call
return void

RollbackFolder() public static method

public static RollbackFolder ( string destfolder, string backup ) : void
destfolder string
backup string
return void

SafeCopyFile() public static method

Copies a file. If the destination already exists, rename it.
public static SafeCopyFile ( string sourcefile, string destfile ) : string
sourcefile string
destfile string
return string

SafeCopyFolder() public static method

public static SafeCopyFolder ( string sourcefolder, string destfolder ) : string
sourcefolder string
destfolder string
return string

TempName() public static method

public static TempName ( string basename ) : string
basename string
return string

Touch() public static method

public static Touch ( string path ) : void
path string
return void