내가 파일 시스템 APIHTML5 파일 시스템 API
function initFS(grantedBytes) {
window.requestFileSystem(window.PERSISTENT, grantedBytes, function (filesystem) {
fs = filesystem;
fs.root.getFile('log.txt', { create: true, exclusive: true }, function (fileEntry) {
// fileEntry.isFile === true
// fileEntry.name == 'log.txt'
// fileEntry.fullPath == '/log.txt'
console.log(fileEntry.fullPath);
}, errorHandler);
}, errorHandler);
}
initFS(1024*1024);
에 의해 파일 'log.txt에'를 만든 완벽 그 구조를 이해하지 않습니다. 이 파일을 탐색 할 방법이 있습니까? 예를 들어 Windows 탐색기의 을 파일 시스템에서 볼 수 있습니까?
HTML5 FileSystem은 샌드 박스 처리되어 있습니다. Windows에서 쉽게 액세스 할 수있는 방법은 없습니다. 이것은 적대적인 코드가 호스트 파일 시스템을 공격하지 못하게하는 보안 기능입니다. –
그리고 난이 파일에 스크립트 태그의 src를 설정할 수 없다. ??? –
대답은 아니오이며 좋은 이유입니다. 이유에 대한보다 완전한 대답은 내 대답에 설명되어 있습니다. http://stackoverflow.com/a/19281109/2567232 – PhilNicholas