Ebook Using the HTML5 Filesystem API

HTML5 File system API
HTML5 File system API

Download

THÔNG TIN TÀI LIỆU

Nhà xuất bản O’Reilly
Tác giả Eric Bidelman
Số trang 72
Ngày xuất bản 2011
File PDF

NỘI DUNG TÀI LIỆU
1. Introduction
Use Cases 1
Security Considerations 3
Browser Support 3
A Cautionary Tale 3

2. Storage and Quota
Storage Types 5
Temporary Storage 6
Persistent Storage 6
Unlimited Storage 7
Quota Management API 8
Requesting More Storage 8
Checking Current Usage 9

3. Getting Started
Opening a Filesystem 11
Handling Errors 13

4. Working with Files
The FileEntry 15
Creating a File 16
Reading a File by Name 17
Writing to a File 18
Appending Data to a File 19
Importing Files 20
Using < input type=“file” > 21
Using HTML5 Drag and Drop 22
Using XMLHttpRequest 24
Using Copy and Paste 27
Removing Files 28

5. Working with Directories
The DirectoryEntry 31
Creating Directories 32
Subdirectories 33
Reading the Contents of a Directory 34
Removing Directories 36
Recursively Removing a Directory 36

6. Copying, Renaming, and Moving Entries
Copying a File or Directory 37
Moving a File or Directory 39
Renaming a File or Directory 40

7. Using Files
Filesystem URLs 43
Summary 45
Blob URLs 45
Summary 49
Data URLs 49
Summary 50

8. The Synchronous API
Introduction 53
Opening a Filesystem 53
Working with Files and Directories 54
Handling Errors 54
Examples 54
Fetching All Entries in the Filesystem 55
Downloading Files Using XHR2 56

Be the first to comment

Leave a Reply

Your email address will not be published.

*