Example #1
0
 @Override
 public void clearCache() {
   super.clearCache();
   childCache.clear();
   mimeCache.clear();
   internal.clear();
 }
Example #2
0
            public Iterable<String> create(java.lang.Void using) {
              final String[] children = internal.get().list();

              if (children != null && children.length > 0)
                return new Iterable<String>() {
                  public Iterator<String> iterator() {
                    return new Iterator<String>() {
                      int pos = -1;

                      public boolean hasNext() {
                        return pos + 1 < children.length;
                      }

                      public String next() {
                        return children[++pos];
                      }

                      public void remove() {
                        throw new UnsupportedOperationException("Not supported.");
                      }
                    };
                  }
                };
              else
                return new Iterable<String>() {
                  public Iterator<String> iterator() {
                    return new Iterator<String>() {
                      public boolean hasNext() {
                        return false;
                      }

                      public String next() {
                        throw new UnsupportedOperationException("Not supported.");
                      }

                      public void remove() {
                        throw new UnsupportedOperationException("Not supported.");
                      }
                    };
                  }
                };
            }
Example #3
0
 @Override
 public boolean exists() {
   return internal.get().exists();
 }
Example #4
0
 public void markDeleteOnExit() {
   internal.get().deleteOnExit();
 }
Example #5
0
 @Override
 public boolean canWrite() {
   return internal.get().canWrite();
 }
Example #6
0
 @Override
 public long size() {
   return internal.get().length();
 }
Example #7
0
 public void delete() {
   internal.get().delete();
 }
Example #8
0
 @Override
 public boolean canRead() {
   return internal.get().canRead();
 }
Example #9
0
 @Override
 public long lastModified() {
   return internal.get().lastModified();
 }
Example #10
0
 @Override
 public boolean isHidden() {
   return internal.get().isHidden();
 }
Example #11
0
 @Override
 public String mimeType() {
   return mimeCache.get();
 }
Example #12
0
 @Override
 public boolean isDirectory() {
   return internal.get().isDirectory();
 }