C# Class kOS.Safe.Persistence.Volume

Inheritance: Structure
Show file Open project: KSP-KOS/KOS Class Usage Examples

Public Methods

Method Description
Clear ( ) : void
CreateDirectory ( VolumePath path ) : VolumeDirectory
CreateDirectory ( string pathString ) : VolumeDirectory
CreateFile ( VolumePath path ) : VolumeFile
CreateFile ( string pathString ) : VolumeFile
Delete ( VolumePath path, bool ksmDefault = false ) : bool
Delete ( string pathString, bool ksmDefault = false ) : bool
Exists ( VolumePath path, bool ksmDefault = false ) : bool
Exists ( string pathString, bool ksmDefault = false ) : bool
IsRoomFor ( VolumePath path, FileContent fileContent ) : bool
ListAsLexicon ( ) : Lexicon
Open ( VolumePath path, bool ksmDefault = false ) : VolumeItem

Get a file given its name

Open ( string pathString, bool ksmDefault = false ) : VolumeItem
OpenOrCreateDirectory ( VolumePath path ) : VolumeDirectory
OpenOrCreateFile ( VolumePath path, bool ksmDefault = false ) : VolumeFile
OpenSafe ( string pathString, bool ksmDefault = false ) : Structure
RequiredPower ( ) : float
SaveFile ( VolumeFile volumeFile ) : VolumeFile
SaveFile ( VolumePath path, FileContent content, bool verifyFreeSpace = true ) : VolumeFile
ToString ( ) : string

Protected Methods

Method Description
InitializeName ( string name ) : void
Volume ( ) : System.Collections.Generic

Private Methods

Method Description
InitializeVolumeSuffixes ( ) : void

Method Details

Clear() public abstract method

public abstract Clear ( ) : void
return void

CreateDirectory() public abstract method

public abstract CreateDirectory ( VolumePath path ) : VolumeDirectory
path VolumePath
return VolumeDirectory

CreateDirectory() public method

public CreateDirectory ( string pathString ) : VolumeDirectory
pathString string
return VolumeDirectory

CreateFile() public abstract method

public abstract CreateFile ( VolumePath path ) : VolumeFile
path VolumePath
return VolumeFile

CreateFile() public method

public CreateFile ( string pathString ) : VolumeFile
pathString string
return VolumeFile

Delete() public abstract method

public abstract Delete ( VolumePath path, bool ksmDefault = false ) : bool
path VolumePath
ksmDefault bool
return bool

Delete() public method

public Delete ( string pathString, bool ksmDefault = false ) : bool
pathString string
ksmDefault bool
return bool

Exists() public abstract method

public abstract Exists ( VolumePath path, bool ksmDefault = false ) : bool
path VolumePath
ksmDefault bool
return bool

Exists() public method

public Exists ( string pathString, bool ksmDefault = false ) : bool
pathString string
ksmDefault bool
return bool

InitializeName() protected method

protected InitializeName ( string name ) : void
name string
return void

IsRoomFor() public method

public IsRoomFor ( VolumePath path, FileContent fileContent ) : bool
path VolumePath
fileContent FileContent
return bool

ListAsLexicon() public method

public ListAsLexicon ( ) : Lexicon
return Lexicon

Open() public abstract method

Get a file given its name
public abstract Open ( VolumePath path, bool ksmDefault = false ) : VolumeItem
path VolumePath
ksmDefault bool in the scenario where there is no filename extension, do we prefer the .ksm over the .ks? The default is to prefer .ks
return VolumeItem

Open() public method

public Open ( string pathString, bool ksmDefault = false ) : VolumeItem
pathString string
ksmDefault bool
return VolumeItem

OpenOrCreateDirectory() public method

public OpenOrCreateDirectory ( VolumePath path ) : VolumeDirectory
path VolumePath
return VolumeDirectory

OpenOrCreateFile() public method

public OpenOrCreateFile ( VolumePath path, bool ksmDefault = false ) : VolumeFile
path VolumePath
ksmDefault bool
return VolumeFile

OpenSafe() public method

public OpenSafe ( string pathString, bool ksmDefault = false ) : Structure
pathString string
ksmDefault bool
return Structure

RequiredPower() public method

public RequiredPower ( ) : float
return float

SaveFile() public method

public SaveFile ( VolumeFile volumeFile ) : VolumeFile
volumeFile VolumeFile
return VolumeFile

SaveFile() public abstract method

public abstract SaveFile ( VolumePath path, FileContent content, bool verifyFreeSpace = true ) : VolumeFile
path VolumePath
content FileContent
verifyFreeSpace bool
return VolumeFile

ToString() public method

public ToString ( ) : string
return string

Volume() protected method

protected Volume ( ) : System.Collections.Generic
return System.Collections.Generic