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