Class fever.app.context.browser.SOFilesystem

Implemented Interfaces

IFileSystem

Description

Simulated filesystem using SharedObject.

This filesystem is 100% synchron. //TODO Current implementation still beta; certainly need optimization and refactoring to avoid duplicated code.

Field Index

Inherited from FileSystem

Method Index

appendToFile(), createDirectory(), deleteDirectory(), deleteFile(), getAppDirectory(), getContent(), getInstance(), getTempDirectory(), isAvailable(), isDirectory(), isFile(), readFile(), renameDirectory(), renameFile(), writeToFile()

Inherited from FileSystem

Method Detail

getInstance

static public function getInstance():SOFilesystem

Returns SOFilesystem instance.

isDirectory

public function isDirectory(folder:String):Boolean

Returns true if passed-in folder is a valid directory on filesystem.

Parameters

folderA fully qualified path

Specified By

isDirectory() in fever.app.context.abstract.IFileSystem

createDirectory

public function createDirectory(folder:String):Boolean

Creates passed-in folder directory on filesystem.

Returns true if operation ends successfully.

Parameters

folderA fully qualified path

Specified By

createDirectory() in fever.app.context.abstract.IFileSystem

deleteDirectory

public function deleteDirectory(folder:String):Boolean

Removes passed-in folder directory from filesystem.

All files / folders insides are also deleted.

Returns true if operation ends successfully.

Parameters

folderA fully qualified path

Specified By

deleteDirectory() in fever.app.context.abstract.IFileSystem

renameDirectory

public function renameDirectory(folder:String, newName:String):Boolean

Renames passed-in folder directory with new passed-in newFolderName name.

Returns true if operation ends successfully.

Parameters

folderA fully qualified path

Specified By

renameDirectory() in fever.app.context.abstract.IFileSystem

isFile

public function isFile(path:String):Boolean

Returns true if passed-in path is a valid file on filesystem.

Parameters

pathA fully qualified file path

Specified By

isFile() in fever.app.context.abstract.IFileSystem

renameFile

public function renameFile(path:String, newName:String):Boolean

Renames passed-in path file with new passed-in newName name.

Returns true if operation ends successfully.

Parameters

pathA fully qualified file path
newNameA fully qualified file path

Specified By

renameFile() in fever.app.context.abstract.IFileSystem

deleteFile

public function deleteFile(path:String):Boolean

Removes passed-in path file from filesystem.

Returns true if operation ends successfully.

Parameters

pathA fully qualified file path

Specified By

deleteFile() in fever.app.context.abstract.IFileSystem

readFile

public function readFile(path:String):String

Reads file text content.

Parameters

pathA full qualified filename

Return

File content or null if application can't read file.

Specified By

readFile() in fever.app.context.abstract.IFileSystem

writeToFile

public function writeToFile(data:String, path:String):Boolean

Writes text data into file.

Parameters

dataString to write in file
path( optional ) A fully qualified path to the file you want to write.
Default use application starting directory.

Specified By

writeToFile() in fever.app.context.abstract.IFileSystem

appendToFile

public function appendToFile(data:String, path:String):Boolean

Appends text data into file.

Parameters

dataString to write in file
pathA fully qualified path to the file you want to write.
Default use application starting directory.

Specified By

appendToFile() in fever.app.context.abstract.IFileSystem

getContent

public function getContent(folder:String):Object

Returns all content of filesystem.

isAvailable

public function isAvailable():Boolean

Description copied from FileSystem

Returns is filesystem is ready.

Only really use by SharedObject and Server filesystem.

Specified By

isAvailable() in fever.app.context.abstract.IFileSystem

Overrides

isAvailable() in fever.app.context.abstract.FileSystem

getTempDirectory

public function getTempDirectory():String

Returns user "temporary" directory from current system.

Specified By

getTempDirectory() in fever.app.context.abstract.IFileSystem

getAppDirectory

public function getAppDirectory():String

Returns current application path from current system.

Specified By

getAppDirectory() in fever.app.context.abstract.IFileSystem