/** * Both root and file are absolute paths to files. This constructor calculates * the relative part of the second argument based on the first. */ public RepoFile(File root, File file) { this.fs = new FsFile(file); this.root = FilenameUtils.normalize(root.getAbsolutePath()); this.rel = fs.path.substring((int) this.root.length()); this.absPath = new File(root, rel).getAbsolutePath(); }
public long length() { return fs.length(); }
public ChecksumAlgorithm hasher() { return fs.hasher(); }
public String hash() { return fs.hash(); }