Titanium.Filesystem

Submodule of Titanium.
Platform Since
Android 0.1
iPhone 0.1
iPad 0.1

Summary

The top level Filesystem module. The Filesystem module is used for reading and saving files and directories on the device.

Objects

Name Summary
Titanium.Filesystem.File

The File object which support various filesystem based operations.

Titanium.Filesystem.FileStream

Wrapper around Titanium.Filesystem.File that implements the Titanium.IOStream interface

Methods

Name Summary
addEventListener

Adds the specified callback as an event listener for the named event.

createFile

Create and return an instance of Titanium.Filesystem.File.

createTempDirectory

create temp file and return a Titanium.Filesystem.File

createTempFile

create a temp file and return a Titanium.Filesystem.File

fireEvent

Fires a synthesized event to any registered listeners.

getApplicationDataDirectory

Gets the value of the applicationDataDirectory property.

getApplicationDirectory

Gets the value of the applicationDirectory property.

getFile

return a fully formed file path as a Titanium.Filesystem.File object

getLineEnding

Gets the value of the lineEnding property.

getResourcesDirectory

Gets the value of the resourcesDirectory property.

getSeparator

Gets the value of the separator property.

getTempDirectory

Gets the value of the tempDirectory property.

isExternalStoragePresent

returns true if the android device supports external storage such as an SD card. Returns false on iOS.

removeEventListener

Removes the specified callback as an event listener for the named event.

Properties

Name Type Summary
MODE_APPEND Number

constant for append mode for file operations read-only

MODE_READ Number

constant for read mode for file operations read-only

MODE_WRITE Number

constant for write mode for file operations read-only

applicationDataDirectory String

constant where your application data directory is located. this directory should be used to place applications-specific files. on iPhone, this directory is also backed up. read-only

applicationDirectory String

constant where your application is located read-only

lineEnding String

platform specific line ending constant read-only

resourcesDirectory String

constant where your application resources are located read-only

separator String

path separator constant read-only

tempDirectory String

constant where your application can place temporary files read-only

Events

This type has no events.