Esempio n. 1
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.");
                      }
                    };
                  }
                };
            }
Esempio n. 2
0
 @Override
 public boolean exists() {
   return internal.get().exists();
 }
Esempio n. 3
0
 public void markDeleteOnExit() {
   internal.get().deleteOnExit();
 }
Esempio n. 4
0
 @Override
 public boolean canWrite() {
   return internal.get().canWrite();
 }
Esempio n. 5
0
 @Override
 public long size() {
   return internal.get().length();
 }
Esempio n. 6
0
 public void delete() {
   internal.get().delete();
 }
Esempio n. 7
0
 @Override
 public boolean canRead() {
   return internal.get().canRead();
 }
Esempio n. 8
0
 @Override
 public long lastModified() {
   return internal.get().lastModified();
 }
Esempio n. 9
0
 @Override
 public boolean isHidden() {
   return internal.get().isHidden();
 }
Esempio n. 10
0
 @Override
 public String mimeType() {
   return mimeCache.get();
 }
Esempio n. 11
0
 @Override
 public boolean isDirectory() {
   return internal.get().isDirectory();
 }