The Top Level Titanium Module

The Top Level Titanium Module

Оригинал / Перевод

Titanium.Filesystem

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

Objects

Name / Description
Titanium.Filesystem.File / The File object which support various filesystem based operations.

Methods

Name / Description
addEventListener / add an event listener for the instance to receive view triggered events
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 / fire a synthesized event to the views listener
getFile / return a fully formed file path as a Titanium.Filesystem.File object
isExteralStoragePresent / returns true if the device supports external storage such as an SD card
removeEventListener / remove a previously added event listener

Properties

Name / Type / Description
MODE_APPEND / int / constant for append mode for file operations
MODE_READ / int / constant for read mode for file operations
MODE_WRITE / int / constant for write mode for file operations
applicationDataDirectory / string / readonly 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.
applicationDirectory / string / readonly constant where your application is located
lineEnding / string / readonly platform specific line ending constant
resourcesDirectory / string / readonly constant where your application resources are located
separator / string / readonly path separator constant
tempDirectory / string / readonly constant where your application can place temporary files

Events

This module has no events /

Titanium.Filesystem

подмодульTitanium
0.1
МодульFilesystem высшегоуровня. МодульFilesystemиспользуетсядлячтенияисохранения файлов и директорий на устройстве.

Объекты

Название / Описание
Titanium.Filesystem.File / Файловыйобъект, которыйподдерживаетразличныеоперациифайловой системы

Методы

Название / Описание
addEventListener / добавляеткэкземпляруобработчик событий для получения инициируемых видом событий
createFile / создает и возвращает экземплярTitanium.Filesystem.File
createTempDirectory / создает временный файл и возвращаетTitanium.Filesystem.File
createTempFile / создаетвременныйфайливозвращаетTitanium.Filesystem.File
fireEvent / инициирует синтезированное событие в перехватчике событий вида
getFile / Возвращает полностьюсформированный путь к файлу в виде объектаTitanium.Filesystem.File
isExteralStoragePresent / возвращаетистину, еслиустройствоподдерживаетвнешние запоминающие устройства, такие как SD-карты
removeEventListener / удаляетранее добавленный обработчик событий

Свойства

Название / Тип / Описание
MODE_APPEND / int / константарежимадозаписи для файловых операций
MODE_READ / int / константа режима чтения для файловых операций
MODE_WRITE / int / константарежима записи для файловых операций
applicationDataDirectory / string / константатолькодлячтения, вкоторойнаходитсядиректорияданныхвашегоприложения. Вэтойдиректориидолжнынаходитьсяспециальныефайлы данного приложения. Этадиректориятакже копируется наiPhone
applicationDirectory / string / константа только для чтения, в которой находится ваше приложение
lineEnding / string / зависящая от платформы константаокончания строки толькодлячтения
resourcesDirectory / string / константа только для чтения, где находятся ресурсы вашего приложения
separator / string / константа только для чтения, разделяющая путь
tempDirectory / string / константа только для чтения, в которой могут находиться временные файлы вашего приложения

События

Данный модуль не имеет событий

Titanium.Filesystem.File

object of Titanium.Filesystem
0.1
The File object which support various filesystem based operations.

Methods

Name / Description
addEventListener / add an event listener for the instance to receive view triggered events
createDirectory / create a directory at the path for the file object
createFile / create a file path at the path for the file object
createTimestamp / return the created timestamp for the file
deleteDirectory / delete the file directory path
deleteFile / delete the file
executable / returns true if the file is executable
exists / returns true if the file or directory exists on the device
extension / return the file extension
fireEvent / fire a synthesized event to the views listener
getDirectoryListing / return an array of paths in the directory of the file object
getParent / return the file parent
hidden / returns true if the file is hidden
modificationTimestamp / return the last modification timestamp for the file
move / move the file to another path
name / the name of the file
nativePath / returns the fully resolved native path
read / return the contents of file as blob
readonly / returns true if the file is readonly
removeEventListener / remove a previously added event listener
rename / rename the file
setExecutable / make the file executable
setHidden / make the file hidden
setReadonly / make the file readonly
spaceAvailable / return boolean to indicate if the path has space available for storage
symbolicLink / returns true if the file points to a symbolic link
write / write the contents to file
writeable / returns true if the file is writeable

Properties

This object has no properties

Events

This object has no events /

Titanium.Filesystem.File

объект Titanium.Filesystem
0.1
Объект File, который поддерживает различные операции файловой системы.

Методы

Название / Описание
addEventListener / добавляеткэкземпляруобработчик событий для получения инициируемых видом событий
createDirectory / создает директорию в пути к файловому объекту
createFile / создает путь к файлу в пути к файловому объекту
createTimestamp / возвращает созданную отметку времени файлу
deleteDirectory / удаляет путь к директории файла
deleteFile / удаляет файл
executable / возвращаетистину, если файл является исполняемым
exists / возвращает истину, если файл или директория есть на устройстве
extension / возвращаетрасширение имени файла
fireEvent / инициирует синтезированное событие в перехватчике событий вида
getDirectoryListing / возвращает массив путей в директории файлового объекта
getParent / возвращает предка файла
hidden / возвращает истину, если файл скрыт
modificationTimestamp / возвращает отметку времени последней модификации файла
move / перемещает файл в другой путь
name / имя файла
nativePath / возвращаетсформированный собственный путь
read / возвращает содержимое файла в виде большого двоичного объекта
readonly / возвращает истину, если файл только для чтения
removeEventListener / удаляетранее добавленный обработчик событий
rename / переименовывает файл
setExecutable / делает файл исполняемым
setHidden / делает файл скрытым
setReadonly / делает файл только для чтения
spaceAvailable / возвращаетбулеан, чтобыопределить, доступнолипространстводля хранения данных
symbolicLink / возвращаетистину, еслифайлуказываетнасимвольную ссылку
write / записывает содержимое в файл
writeable / возвращает истину, если файл является записываемым

Свойства

Данный объект не имеет свойств

События

Данный объект не имеет событий