{"id":1832,"date":"2016-01-31T01:58:09","date_gmt":"2016-01-30T16:58:09","guid":{"rendered":"http:\/\/appsweets.net\/blog\/?p=1832"},"modified":"2016-01-31T01:58:09","modified_gmt":"2016-01-30T16:58:09","slug":"access-local-files-from-wasavi-3","status":"publish","type":"post","link":"https:\/\/appsweets.net\/blog\/2016\/01\/31\/access-local-files-from-wasavi-3\/","title":{"rendered":"Access local files from wasavi #3"},"content":{"rendered":"<div class=\"db9cc8cdb64025d13c1cc9dad0a0e262\" data-index=\"1\" style=\"float: left; margin: 16px 16px 16px 0;\">\n<script type=\"text\/javascript\"><!--\r\ngoogle_ad_client = \"ca-pub-5825700137064158\";\r\n\/* 250sq, appsweets-blog *\/\r\ngoogle_ad_slot = \"4837931762\";\r\ngoogle_ad_width = 250;\r\ngoogle_ad_height = 250;\r\n\/\/-->\r\n<\/script>\r\n<script type=\"text\/javascript\"\r\nsrc=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\r\n<\/script>\n<\/div>\n<p>\u5b9f\u969b\u306b wasavi \u4e0a\u306e\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u306e1\u3064\u3068\u3057\u3066\u7d44\u307f\u8fbc\u3080\u3002<\/p>\n<p>\u306e\u3060\u304c\u3001\u305d\u306e\u524d\u306b\u3001\u30d5\u30a1\u30a4\u30eb\u306e\u8aad\u307f\u66f8\u304d\u306e\u4ed6\u306b\u3082\u3046\u4e00\u3064\u30b3\u30de\u30f3\u30c9\u304c\u5fc5\u8981\u3060\u3002\u305d\u308c\u306f\u4efb\u610f\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306e\u30d5\u30a1\u30a4\u30eb\u7fa4\u306e\u30ea\u30b9\u30c8\u3067\u3001\u3044\u308f\u3086\u308b ls \u3060\u3002\u3053\u308c\u306f wasavi \u3067\u306f tab \u30ad\u30fc\u306b\u3088\u308b\u30d5\u30a1\u30a4\u30eb\u540d\u306e\u88dc\u5b8c\u6642\u306b\u547c\u3070\u308c\u308b\u3002ls \u7684\u306a\u51e6\u7406\u3092\u66f8\u3044\u3066\u3044\u3066\u3001\u3044\u304f\u3064\u304b\u5947\u5999\u306a\u3053\u3068\u306b\u6c17\u304c\u3064\u3044\u305f\u3002<\/p>\n<p>Chrome \u306e filesystem API \u3067\u305d\u308c\u3092\u884c\u3046\u306b\u306f\u3001<\/p>\n<ol>\n<li>\u30eb\u30fc\u30c8\u3068\u306a\u308b directoryEntry \u304b\u3089\u3001\u4efb\u610f\u306e\u30d1\u30b9\u3078\u306e directoryEntry \u3092\u5f97\u308b<\/li>\n<li>\u5f97\u305f directoryEntry \u306e createReader() \u3092\u547c\u3073\u51fa\u3059<\/li>\n<li>\u5f97\u305f DirectoryReader \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e readEntries() \u3092<b>\u8907\u6570\u56de<\/b>\u547c\u3073\u51fa\u3059\u3002<\/li>\n<\/ol>\n<p>\u3068\u3044\u3046\u51e6\u7406\u3092\u884c\u3046\u5fc5\u8981\u304c\u3042\u308b\u3002<\/p>\n<p>\u3053\u306e\u3068\u304d\u30011. \u304c\u306a\u3093\u3060\u304b\u5947\u5999\u3060\u3002<br \/>\n<code lang=\"javascript\"><br \/>\nrootEntry.getDirectory(<br \/>\n  '', \/\/ path<br \/>\n  {}, \/\/ options<br \/>\n  function (dir) {<br \/>\n    \/\/ success callback<br \/>\n  },<br \/>\n  function (err) {<br \/>\n    \/\/ error callback<br \/>\n  }<br \/>\n);<br \/>\n<\/code><br \/>\n\u306e\u3046\u3061\u3001path\u3002\u3053\u308c\u306f\u7d76\u5bfe\u30d1\u30b9\u304b\u3001\u76f8\u5bfe\u30d1\u30b9\u3092\u6307\u5b9a\u3059\u308b\u3068<a href=\"http:\/\/dev.w3.org\/2009\/dap\/file-system\/file-dir-sys.html#methods-3\" target=\"_blank\">\u5b9a\u7fa9<\/a>\u3055\u308c\u3066\u3044\u308b\u3002rootEntry \u306e\u5b9f\u4f53\u304c [cci]\/home\/akahuku[\/cci] \u3060\u3063\u305f\u3068\u3057\u3066\u3001\u4f8b\u3048\u3070\u305d\u306e\u4e2d\u306e [cci]bin[\/cci] \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u4e0b\u306e\u30d5\u30a1\u30a4\u30eb\u30ea\u30b9\u30c8\u3092\u53d6\u308a\u305f\u3044\u5834\u5408\u3001<\/p>\n<ul>\n<li>bin<\/li>\n<li>.\/bin<\/li>\n<li>\/bin<\/li>\n<\/ul>\n<p>\u3044\u305a\u308c\u3067\u3082\u540c\u3058\u7d50\u679c\u304c\u8fd4\u308b\u306f\u305a\u3067\u3042\u308b\u3002\u3057\u304b\u3057\u3001Chrome \u306e\u5b9f\u88c5\u3067\u306f\u7d76\u5bfe\u30d1\u30b9\u3092\u4e0e\u3048\u308b\u3068\u30a8\u30e9\u30fc\u306b\u306a\u308b\u3002\u78ba\u304b\u306b\u3001\u305d\u3082\u305d\u3082\u3053\u306e\u6587\u8108\u3067\u306e\u7d76\u5bfe\u30d1\u30b9\u3068\u3044\u3046\u3082\u306e\u306e\u5b9a\u7fa9\u304c\u3088\u304f\u5206\u304b\u3089\u306a\u3044\u3002\u7d50\u5c40\u306e\u3068\u3053\u308d rootEntry \u304b\u3089\u306e\u76f8\u5bfe\u30d1\u30b9\u3068\u3057\u3066\u6271\u3048\u3070\u3044\u3044\u306e\u304b\u3001\u5b9f\u969b\u306e\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u4e0a\u306e\u7d76\u5bfe\u30d1\u30b9\u3068\u3057\u3066\u6271\u3046\u3079\u304d\u3082\u306e\u306a\u306e\u304b W3C \u306e\u4ed5\u69d8\u5b9a\u7fa9\u306b\u306f\u66f8\u3044\u3066\u306a\u3044\u3002\u3046\u30fc\u3093\uff1f<\/p>\n<p>\u3082\u3046\u3072\u3068\u3064\u3001fileEntry \u3084 directoryEntry \u306e\u89aa\u3067\u3042\u308b fullPath \u30d7\u30ed\u30d1\u30c6\u30a3\u3082\u306a\u3093\u304b\u5909\u3002\u4e0a\u8a18\u306e\u901a\u308a [cci]\/home\/akahuku[\/cci] \u306b\u5bfe\u5fdc\u3059\u308b directoryEntry \u306e fullPath \u3092\u53c2\u7167\u3059\u308b\u3068\u3001[cci]\/akahuku[\/cci] \u306a\u306e\u3067\u3042\u308b\u3002\u2026\u306a\u3093\u3067\uff1f\u3000\u4ed5\u69d8\u5b9a\u7fa9\u3067\u306f\u3001\u3053\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u306f<\/p>\n<blockquote><p>The full absolute path from the root to the entry. <\/p><\/blockquote>\n<p>\u3067\u3042\u308b\u3002\u3064\u307e\u308a [cci]\/[\/cci] \u3058\u3083\u306a\u3044\u3068\u304a\u304b\u3057\u3044\u3002<\/p>\n<p>\u3053\u306e\u3078\u3093\u306e\u8fbb\u8904\u3092\u4f55\u3068\u304b\u5408\u308f\u305b\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002<\/p>\n<div class=\"db9cc8cdb64025d13c1cc9dad0a0e262\" data-index=\"1\" style=\"float: left; margin: 16px 16px 16px 0;\">\n<script type=\"text\/javascript\"><!--\r\ngoogle_ad_client = \"ca-pub-5825700137064158\";\r\n\/* 250sq, appsweets-blog *\/\r\ngoogle_ad_slot = \"4837931762\";\r\ngoogle_ad_width = 250;\r\ngoogle_ad_height = 250;\r\n\/\/-->\r\n<\/script>\r\n<script type=\"text\/javascript\"\r\nsrc=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\r\n<\/script>\n<\/div>\n\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>\u5b9f\u969b\u306b wasavi \u4e0a\u306e\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u306e1\u3064\u3068\u3057\u3066\u7d44\u307f\u8fbc\u3080\u3002 \u306e\u3060\u304c\u3001\u305d\u306e\u524d\u306b\u3001\u30d5\u30a1\u30a4\u30eb\u306e\u8aad\u307f\u66f8\u304d\u306e\u4ed6\u306b\u3082\u3046\u4e00\u3064\u30b3\u30de\u30f3\u30c9\u304c\u5fc5\u8981\u3060\u3002\u305d\u308c\u306f\u4efb\u610f\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306e\u30d5\u30a1\u30a4\u30eb\u7fa4\u306e\u30ea\u30b9\u30c8\u3067\u3001\u3044\u308f\u3086\u308b ls \u3060\u3002\u3053\u308c\u306f wasavi \u3067\u306f tab \u30ad\u30fc\u306b\u3088\u308b\u30d5\u30a1\u30a4\u30eb\u540d\u306e\u88dc\u5b8c\u6642\u306b\u547c\u3070\u308c\u308b\u3002ls \u7684\u306a\u51e6\u7406\u3092\u66f8\u3044\u3066\u3044\u3066\u3001\u3044\u304f\u3064\u304b\u5947\u5999\u306a\u3053\u3068\u306b\u6c17\u304c\u3064\u3044\u305f\u3002 Chrome \u306e filesystem API \u3067\u305d\u308c\u3092\u884c\u3046\u306b\u306f\u3001 \u30eb\u30fc\u30c8\u3068\u306a\u308b directoryEntry \u304b\u3089\u3001\u4efb\u610f\u306e\u30d1\u30b9\u3078\u306e directoryEntry \u3092\u5f97\u308b \u5f97\u305f directoryEntry \u306e createReader() \u3092\u547c\u3073\u51fa\u3059 \u5f97\u305f DirectoryReader \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e readEntries() \u3092\u8907\u6570\u56de\u547c\u3073\u51fa\u3059\u3002 \u3068\u3044\u3046\u51e6\u7406\u3092\u884c\u3046\u5fc5\u8981\u304c\u3042\u308b\u3002 \u3053\u306e\u3068\u304d\u30011. \u304c\u306a\u3093\u3060\u304b\u5947\u5999\u3060\u3002 rootEntry.getDirectory( &#8221;, \/\/ path {}, \/\/ &hellip; <a href=\"https:\/\/appsweets.net\/blog\/2016\/01\/31\/access-local-files-from-wasavi-3\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[41,5,3,4],"class_list":["post-1832","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-chrome","tag-javascript","tag-vi","tag-wasavi"],"_links":{"self":[{"href":"https:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/posts\/1832","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/comments?post=1832"}],"version-history":[{"count":2,"href":"https:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/posts\/1832\/revisions"}],"predecessor-version":[{"id":1834,"href":"https:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/posts\/1832\/revisions\/1834"}],"wp:attachment":[{"href":"https:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/media?parent=1832"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/categories?post=1832"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/tags?post=1832"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}