PhoneGap File System Methods

Description

Javascript methods available in a PhoneGap application for working with the file system on a mobile device.

Discussion

The following methods are available in a UX Component for working with files on a mobile device in a PhoneGap application.

 {dialog.object}.phoneGapCreateDirectory Method

Create a directory

{dialog.object}.phoneGapCreateDirectory(dirName, onComplete, onError);

 {dialog.object}.phoneGapCreateDirectoryRecurse Method

Create a directory (recursively)

{dialog.object}.phoneGapCreateDirectoryRecurse(dirName, onComplete, onError);

 {dialog.object}.phoneGapGetDirectory Method

Read a directory

{dialog.object}.phoneGapGetDirectory(dirName, onComplete, onError);

 {dialog.object}.phoneGapGetDirectoryRecurse Method

Read a directory (recursively)

{dialog.object}.phoneGapGetDirectoryRecurse(folder, onDirComplete, onDirError);

 {dialog.object}.phoneGapRemoveDirectory Method

Remove a directory

{dialog.object}.phoneGapRemoveDirectory(dirName,onSuccess,onError);

 {dialog.object}.phoneGapRemoveDirectoryRecurse Method

Remove a directory (recursively)

{dialog.object}.phoneGapRemoveDirectoryRecurse(dirName,onSuccess,onError);

 {dialog.object}.phoneGapDeleteFile Method

Delete a file

{dialog.object}.phoneGapDeleteFile(fileName,onSuccess,onError);

 {dialog.object}.phoneGapFileExists Method

Check if a file exists

{dialog.object}.phoneGapFileExists(fileName,onResult,onFailed);

 {dialog.object}.phoneGapReadFile Method

Read a file

{dialog.object}.phoneGapReadFile(fileName,onReadFile,onReadFileERROR)

 {dialog.object}.phoneGapCreateFile Method

Create a file

{dialog.object}.phoneGapCreateFile(fileName,text,onCreatedFile,onCreateFileERROR,flagAppend)
File system methods are only supported for PhoneGap applications.

See Also