C# Class Karabow.Steg.Core.FileSystemServices

Helper functions to interact with the file system
Afficher le fichier Open project: Chieze-Franklin/Steg-Studio

Méthodes publiques

Méthode Description
AppendBytesToFile ( string filePath, byte bytes ) : void

Appends bytes to a file in a safe way

AppendTextToFile ( string filePath, string fileText ) : void

Appends text to a file in a safe way

ChangeUrlToFilePath ( string urlPath ) : string

changes a url path to a system directory/file path

CreateDirectory ( string directoryPath, bool canOverride ) : void

Creates a directory

CreateFile ( string filePath, bool canOverride, string defaultText ) : void

Creates a file in a safe way

DeserializeFromBinary ( string filePath ) : object

deserializes an object from binary format

DeserializeFromSoap ( string filePath ) : object

deserializes an object from soap format

DeserializeFromXml ( string filePath, Type type, Type subTypes ) : object

deserializes an object from xml format

GetAbsolutePath ( string mayBeRelativePath, string baseDirectory = null ) : string

Returns the absolute path of the specified (relative) path with respect to the base directory

ReadBytesFromFile ( string filePath ) : byte[]

Reads bytes from a file

ReadTextFromFile ( string filePath ) : string

Reads text from a file

SerializeToBinary ( string filePath, object obj ) : void

serializes an object to binary format

SerializeToSoap ( string filePath, object obj ) : void

serializes an object to soap format

SerializeToXml ( string filePath, object obj, Type type, Type subTypes ) : void

serializes an object to XML format

WriteBytesToFile ( string filePath, byte bytes ) : void

Writes bytes to a file in a safe way

WriteTextToFile ( string filePath, string fileText ) : void

Writes text to a file in a safe way

Method Details

AppendBytesToFile() public static méthode

Appends bytes to a file in a safe way
public static AppendBytesToFile ( string filePath, byte bytes ) : void
filePath string
bytes byte
Résultat void

AppendTextToFile() public static méthode

Appends text to a file in a safe way
public static AppendTextToFile ( string filePath, string fileText ) : void
filePath string
fileText string
Résultat void

ChangeUrlToFilePath() public static méthode

changes a url path to a system directory/file path
public static ChangeUrlToFilePath ( string urlPath ) : string
urlPath string
Résultat string

CreateDirectory() public static méthode

Creates a directory
public static CreateDirectory ( string directoryPath, bool canOverride ) : void
directoryPath string
canOverride bool
Résultat void

CreateFile() public static méthode

Creates a file in a safe way
public static CreateFile ( string filePath, bool canOverride, string defaultText ) : void
filePath string
canOverride bool
defaultText string
Résultat void

DeserializeFromBinary() public static méthode

deserializes an object from binary format
public static DeserializeFromBinary ( string filePath ) : object
filePath string
Résultat object

DeserializeFromSoap() public static méthode

deserializes an object from soap format
public static DeserializeFromSoap ( string filePath ) : object
filePath string
Résultat object

DeserializeFromXml() public static méthode

deserializes an object from xml format
public static DeserializeFromXml ( string filePath, Type type, Type subTypes ) : object
filePath string
type System.Type
subTypes System.Type
Résultat object

GetAbsolutePath() public static méthode

Returns the absolute path of the specified (relative) path with respect to the base directory
public static GetAbsolutePath ( string mayBeRelativePath, string baseDirectory = null ) : string
mayBeRelativePath string
baseDirectory string
Résultat string

ReadBytesFromFile() public static méthode

Reads bytes from a file
public static ReadBytesFromFile ( string filePath ) : byte[]
filePath string The file to be read
Résultat byte[]

ReadTextFromFile() public static méthode

Reads text from a file
public static ReadTextFromFile ( string filePath ) : string
filePath string The file to be read
Résultat string

SerializeToBinary() public static méthode

serializes an object to binary format
public static SerializeToBinary ( string filePath, object obj ) : void
filePath string
obj object
Résultat void

SerializeToSoap() public static méthode

serializes an object to soap format
public static SerializeToSoap ( string filePath, object obj ) : void
filePath string
obj object
Résultat void

SerializeToXml() public static méthode

serializes an object to XML format
public static SerializeToXml ( string filePath, object obj, Type type, Type subTypes ) : void
filePath string
obj object
type System.Type
subTypes System.Type
Résultat void

WriteBytesToFile() public static méthode

Writes bytes to a file in a safe way
public static WriteBytesToFile ( string filePath, byte bytes ) : void
filePath string
bytes byte
Résultat void

WriteTextToFile() public static méthode

Writes text to a file in a safe way
public static WriteTextToFile ( string filePath, string fileText ) : void
filePath string
fileText string
Résultat void