예제 #1
0
 public boolean mkdir() {
   try {
     if (parent != null && !parent.exists()) {
       return false;
     }
     if (exists()) {
       return false;
     }
     // We may want to make this a JS map
     LocalStorage.setItem(getCanonicalPath(), "{}");
     return true;
   } catch (IOException e) {
     return false;
   }
 }
예제 #2
0
 public boolean createNewFile() throws IOException {
   if (exists()) return false;
   if (!parent.exists()) return false;
   LocalStorage.setItem(getCanonicalPath(), RandomAccessFile.btoa(""));
   return true;
 }