@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; }
public boolean isAbsolute() { return file.isAbsolute(); }
public String getPath() { return file.getPath(); }
public String getName() { return file.getName(); }
public boolean isExecutable() { return file.isExecutable(); }
public boolean isWritable() { return file.isWritable(); }
public FileVar getCanonical() { File f = file.getCanonical(); if (f != null) return new FileVar(f); return null; }
public FileVar getParent() { File f = file.getParent(); if (f != null) return new FileVar(f); return null; }
public long getLength() { return file.getLength(); }
public DateVar getModifyDate() { // return file.getModifyDate(); return new DateVar(file.getModifyDate()); }
public boolean isExists() { return file.isExists(); }
public boolean isFile() { return file.isFile(); }
public boolean isDirectory() { return file.isDirectory(); }
public FileVar getAbsolute() { File f = file.getAbsolute(); if (f != null) return new FileVar(f); return null; }
public boolean isRoot() { return file.isRoot(); }
public FileSystem getFileSystem() { return file.getFileSystem(); }
public String getSizeRound() { return new ByteSize(file.getLength()).toStringRoundMin(2); }
public boolean isReadable() { return file.isReadable(); }
public FileVar getChild(String name) { File f = file.getChild(name); if (f != null) return new FileVar(f); return null; }