Пример #1
0
  @Fun
  @Name(name = "localRepo")
  @Help(shortDesc = "create local repo")
  public LocalUplaunchRepo localRepo(
      @Name(name = "path") @Help(shortDesc = "location of repo") String path) {
    if (path == null) return null;

    File froot = FileSystems.get(path);
    File dir = froot;
    if (dir != null && !dir.isExists()) {
      dir.mkdirs();
    }

    LocalUplaunchRepo luprepo = new LocalUplaunchRepo();
    luprepo.setRoot(froot);

    return luprepo;
  }
Пример #2
0
 public boolean isAbsolute() {
   return file.isAbsolute();
 }
Пример #3
0
 public String getPath() {
   return file.getPath();
 }
Пример #4
0
 public String getName() {
   return file.getName();
 }
Пример #5
0
 public boolean isExecutable() {
   return file.isExecutable();
 }
Пример #6
0
 public boolean isWritable() {
   return file.isWritable();
 }
Пример #7
0
 public FileVar getCanonical() {
   File f = file.getCanonical();
   if (f != null) return new FileVar(f);
   return null;
 }
Пример #8
0
 public FileVar getParent() {
   File f = file.getParent();
   if (f != null) return new FileVar(f);
   return null;
 }
Пример #9
0
 public long getLength() {
   return file.getLength();
 }
Пример #10
0
 public DateVar getModifyDate() {
   //        return file.getModifyDate();
   return new DateVar(file.getModifyDate());
 }
Пример #11
0
 public boolean isExists() {
   return file.isExists();
 }
Пример #12
0
 public boolean isFile() {
   return file.isFile();
 }
Пример #13
0
 public boolean isDirectory() {
   return file.isDirectory();
 }
Пример #14
0
 public FileVar getAbsolute() {
   File f = file.getAbsolute();
   if (f != null) return new FileVar(f);
   return null;
 }
Пример #15
0
 public boolean isRoot() {
   return file.isRoot();
 }
Пример #16
0
 public FileSystem getFileSystem() {
   return file.getFileSystem();
 }
Пример #17
0
 public String getSizeRound() {
   return new ByteSize(file.getLength()).toStringRoundMin(2);
 }
Пример #18
0
 public boolean isReadable() {
   return file.isReadable();
 }
Пример #19
0
 public FileVar getChild(String name) {
   File f = file.getChild(name);
   if (f != null) return new FileVar(f);
   return null;
 }