C# Class DataServer.FileStore

Exibir arquivo Open project: TNOCS/csTouch

Public Methods

Method Description
AppendString ( string p, string fileName, string s ) : void
CreateFolder ( string folder ) : void
Empty ( ) : bool
FileStore ( ) : System
FolderExists ( string folder ) : bool
GetBytes ( string folder, string id, bool hash = false ) : Byte[]
GetLocalUrl ( string folder, string Id, bool hash = false ) : string
GetQueue ( ) : void
GetString ( string folder, string id, bool hash = false ) : Task
GetString ( string id ) : string
HasFile ( string id, bool hash = false ) : bool
HasFile ( string folder, string id, bool hash = false ) : bool
Init ( Service s ) : void
LoadBytesFromWeb ( string url ) : Task
LoadImage ( byte imageData, BaseContent c ) : void
LoadImage ( byte imageData, System.Windows.Media.Imaging.BitmapSource &picture ) : void
LoadPhoto ( byte imageData ) : BitmapImage
QueueBytes ( string id ) : void
ReadAllLines ( string id ) : string[]
SaveBytes ( string file, Byte image, bool hash = false ) : bool
SaveBytes ( string folder, string id, Byte image, bool hash = false ) : bool
SaveString ( string folder, string id, string value, bool hash = false ) : bool

Private Methods

Method Description
Copy ( string fileName, string newName ) : void
Delete ( string bck ) : void
FileExists ( string file ) : bool
GetFiles ( string folder, string p ) : List
GetFolders ( string folder ) : List
GetLocalFolder ( ) : string
Move ( string fileName, string newName ) : void

Method Details

AppendString() public method

public AppendString ( string p, string fileName, string s ) : void
p string
fileName string
s string
return void

CreateFolder() public static method

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

Empty() public method

public Empty ( ) : bool
return bool

FileStore() public method

public FileStore ( ) : System
return System

FolderExists() public static method

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

GetBytes() public method

public GetBytes ( string folder, string id, bool hash = false ) : Byte[]
folder string
id string
hash bool
return Byte[]

GetLocalUrl() public method

public GetLocalUrl ( string folder, string Id, bool hash = false ) : string
folder string
Id string
hash bool
return string

GetQueue() public method

public GetQueue ( ) : void
return void

GetString() public method

public GetString ( string folder, string id, bool hash = false ) : Task
folder string
id string
hash bool
return Task

GetString() public method

public GetString ( string id ) : string
id string
return string

HasFile() public method

public HasFile ( string id, bool hash = false ) : bool
id string
hash bool
return bool

HasFile() public method

public HasFile ( string folder, string id, bool hash = false ) : bool
folder string
id string
hash bool
return bool

Init() public method

public Init ( Service s ) : void
s Service
return void

LoadBytesFromWeb() public static method

public static LoadBytesFromWeb ( string url ) : Task
url string
return Task

LoadImage() public static method

public static LoadImage ( byte imageData, BaseContent c ) : void
imageData byte
c BaseContent
return void

LoadImage() public static method

public static LoadImage ( byte imageData, System.Windows.Media.Imaging.BitmapSource &picture ) : void
imageData byte
picture System.Windows.Media.Imaging.BitmapSource
return void

LoadPhoto() public static method

public static LoadPhoto ( byte imageData ) : BitmapImage
imageData byte
return System.Windows.Media.Imaging.BitmapImage

QueueBytes() public method

public QueueBytes ( string id ) : void
id string
return void

ReadAllLines() public method

public ReadAllLines ( string id ) : string[]
id string
return string[]

SaveBytes() public method

public SaveBytes ( string file, Byte image, bool hash = false ) : bool
file string
image Byte
hash bool
return bool

SaveBytes() public method

public SaveBytes ( string folder, string id, Byte image, bool hash = false ) : bool
folder string
id string
image Byte
hash bool
return bool

SaveString() public static method

public static SaveString ( string folder, string id, string value, bool hash = false ) : bool
folder string
id string
value string
hash bool
return bool