C# Class WPCordovaClassLib.Cordova.Commands.File

Provides access to isolated storage
Inheritance: BaseCommand
Mostra file Open project: ChristianWeyer/tUdUs

Public Methods

Method Description
IsDirectoryOrFileExist ( string options, bool isDirectory ) : void

Check if file or directory exist

copyTo ( string options ) : void
getDirectory ( string options ) : void
getFile ( string options ) : void
getFileMetadata ( string options ) : void

Returns a File that represents the current state of the file that this FileEntry represents.

getFreeDiskSpace ( string options ) : void

Gets amount of free space available for Isolated Storage

getMetadata ( string options ) : void

Look up metadata about this entry.

getParent ( string options ) : void

Look up the parent DirectoryEntry containing this Entry. If this Entry is the root of IsolatedStorage, its parent is itself.

moveTo ( string options ) : void
readAsDataURL ( string options ) : void
readAsText ( string options ) : void
readEntries ( string options ) : void
readResourceAsText ( string options ) : void

Reads application resource as a text

remove ( string options ) : void
removeRecursively ( string options ) : void
requestFileSystem ( string options ) : void
resolveLocalFileSystemURI ( string options ) : void
testDirectoryExists ( string options ) : void

Check if directory exists

testFileExists ( string options ) : void

Check if file exists

truncate ( string options ) : void
write ( string options ) : void

Private Methods

Method Description
AddSlashToDirectory ( string dirPath ) : string
CanonicalCompare ( string pathA, string pathB ) : bool
CopyDirectory ( string sourceDir, string destDir, IsolatedStorageFile isoFile ) : void
GetFileContent ( Stream stream ) : string

Returns file content in a form of base64 string

GetFileOrDirectory ( string options, bool getDirectory ) : void
GetParentDirectory ( string path ) : string

Retrieves the parent directory name of the specified path,

HandleException ( Exception ex ) : bool
LoadFileOptions ( string options ) : bool
TransferTo ( string options, bool move ) : void
getSingleStringOption ( string options ) : string
removeDirRecursively ( string fullPath ) : void

Method Details

IsDirectoryOrFileExist() public method

Check if file or directory exist
public IsDirectoryOrFileExist ( string options, bool isDirectory ) : void
options string File path/Directory name
isDirectory bool Flag to recognize what we should check
return void

copyTo() public method

public copyTo ( string options ) : void
options string
return void

getDirectory() public method

public getDirectory ( string options ) : void
options string
return void

getFile() public method

public getFile ( string options ) : void
options string
return void

getFileMetadata() public method

Returns a File that represents the current state of the file that this FileEntry represents.
public getFileMetadata ( string options ) : void
options string
return void

getFreeDiskSpace() public method

Gets amount of free space available for Isolated Storage
public getFreeDiskSpace ( string options ) : void
options string No options is needed for this method
return void

getMetadata() public method

Look up metadata about this entry.
public getMetadata ( string options ) : void
options string filePath to entry
return void

getParent() public method

Look up the parent DirectoryEntry containing this Entry. If this Entry is the root of IsolatedStorage, its parent is itself.
public getParent ( string options ) : void
options string
return void

moveTo() public method

public moveTo ( string options ) : void
options string
return void

readAsDataURL() public method

public readAsDataURL ( string options ) : void
options string
return void

readAsText() public method

public readAsText ( string options ) : void
options string
return void

readEntries() public method

public readEntries ( string options ) : void
options string
return void

readResourceAsText() public method

Reads application resource as a text
public readResourceAsText ( string options ) : void
options string Path to a resource
return void

remove() public method

public remove ( string options ) : void
options string
return void

removeRecursively() public method

public removeRecursively ( string options ) : void
options string
return void

requestFileSystem() public method

public requestFileSystem ( string options ) : void
options string
return void

resolveLocalFileSystemURI() public method

public resolveLocalFileSystemURI ( string options ) : void
options string
return void

testDirectoryExists() public method

Check if directory exists
public testDirectoryExists ( string options ) : void
options string directory name
return void

testFileExists() public method

Check if file exists
public testFileExists ( string options ) : void
options string File path
return void

truncate() public method

public truncate ( string options ) : void
options string
return void

write() public method

public write ( string options ) : void
options string
return void