JS의 파일API를 이용해서 FileSystem을 생성
<!DOCTYPE html>
<html lang="en">
<head>
<script type='text/javascript'>
function log(str)
{
var logConsole = document.getElementById("debugLog");
logConsole.innerText += str + "\n";
}
fs = "";
function createFileSystem(){
window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
var fileSystem = window.requestFileSystem(window.PERSISTENT, 5*1024*1024,createdFS, showerr);
};
function createdFS(e)
{
fs = e.root;
}
function showerr(e)
{
log( "Error : " + e.code );
}
createFileSystem();
</script>
</head>
<body>
<div id="debugArea" style="margin-top:100px;">
<div> Log </div>
<div id="debugLog" style="border:1px;"></div>
</div>
</body>
</html>
'Programming > JS' 카테고리의 다른 글
| [NodeJS] Cannot read property 'Symbol(requestOptions)' of undefined (0) | 2022.09.27 |
|---|---|
| [JS] File list출력 및 File Open (0) | 2014.07.21 |
| [JS] 파일API 파일 쓰기 (0) | 2014.07.18 |
| [JS] File API를 이용한 TextFile load (0) | 2014.07.18 |