Skip to Content
MOBILE WEB程式設計--第二版
book

MOBILE WEB程式設計--第二版

by Maximiliano Firtman
December 2013
Intermediate to advanced
752 pages
16h
Chinese
GoTop Information, Inc.
Content preview from MOBILE WEB程式設計--第二版
離線 App、存放空間與網路
|
501
window.requestFileSystem(window.PERSISTENT, 4*1024*1024,
function(filesystem) {
// 檔案系統已建立∕開啟
}, function(event) {
// 處理錯誤
});
透過這個 API,我們可以:
修改檔案系統配額。
建立與開啟檔案。
附加、替換,與刪除檔案。
建立與刪除目錄。
複製、更名,及移除檔案與目錄。
讀取資料夾的內容。
建立檔案系統 URL
這個 API 給我們一個新的 URI
filesystem:
,我們可以使用它從 Web App 指向任何儲存
在持久或暫時存放空間的檔案。
在寫這本書時,只有 Android Google Chrome 支援這個 API,請查看 Mobile HTML5
http://mobilehtml5.org
)以得知最新的相容資訊。
在第十五章,我們將會討論 File API,它有許多用途,也可與 FileSystem
API 的檔案一起使用。
使用者的干預
雖然表面上我們已經掌控了所有存放空間 API,但事實的真相是大部分的現代行動 Web
瀏覽器都可以讓使用者查看及刪除網站的資料,使用者不一定會知道所有的細節,但至
少他們可以看到網域與所有儲存 API 占用的空間。
在圖13-5,我們可以看到Safari Advanced Website Data Google Chrome
Content ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

成為卓越程式設計師的38項必修法則

成為卓越程式設計師的38項必修法則

Pete Goodliffe
精實企業|高績效組織如何達成創新規模化

精實企業|高績效組織如何達成創新規模化

Jez Humble, Joanne Molesky, Barry O'Reilly

Publisher Resources

ISBN: 9789862769522