File
Tizen enables you to access local storage to read file information. In mobile applications, you can also manipulate files by accessing sandboxed file systems.
The main features of the File API include:
- Local file management
- Reading local file information
You can select a local file to upload using the FileList interface, which creates and returns a File object.
The File object is used to read basic file information.
- Reading local file content
You can use the reading methods of the FileReader interface to read file content in text, binary, or dataURL format. If the data is loaded, the onload event occurs. This event uses the data reading methods according to file format.
- Slicing local files
You can use the slice() method with a local file or the Blob interface to slice data objects. You can use the created blob to read data as a binary string using the FileReader interface.
- Reading local file information
- Sandboxed file system management in mobile applications
- Accessing sandboxed file systems
You can request access to a sandboxed file system using the LocalFileSystem interface.
- Displaying files in a sandboxed file system
You can use readEntries() method of the DirectoryReader interface to display directories or files.
- Creating a directory or file within a sandboxed file system
You can use the getDirectory() and getFile() methods of the DirectoryEntry interface) to create a directory or file.
- Deleting a directory or file within a sandboxed file system
You can use the removeRecursively() method of the DirectoryEntry interface and the remove() method of the Entry interface to delete a directory or file.
- Accessing sandboxed file systems