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