Package ome.services.scripts
Class RepoFile
- java.lang.Object
-
- ome.services.scripts.RepoFile
-
public class RepoFile extends java.lang.ObjectFile type wrapper for paths which are intended for being stored in the database as a part of this repository.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRepoFile.FsFileFile type wrapper for actual OS files.
-
Constructor Summary
Constructors Constructor Description RepoFile(java.io.File root, java.io.File file)Both root and file are absolute paths to files.RepoFile(java.io.File root, java.lang.String path)Assumes that path is relative under root, and constructs a newFileand callsRepoFile(File, File)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringbasename()java.lang.Stringdirname()java.io.Filefile()java.lang.Stringfullname()java.lang.Stringhash()ome.model.enums.ChecksumAlgorithmhasher()longlength()booleanmatches(java.io.File file)static java.lang.Stringnorm(java.lang.String path)Somewhat complicated method to turn any path into a unique like path rooted at "/".java.lang.StringtoString()
-
-
-
Constructor Detail
-
RepoFile
public RepoFile(java.io.File root, java.lang.String path)Assumes that path is relative under root, and constructs a newFileand callsRepoFile(File, File)
-
RepoFile
public RepoFile(java.io.File root, java.io.File file)Both root and file are absolute paths to files. This constructor calculates the relative part of the second argument based on the first.
-
-
Method Detail
-
norm
public static java.lang.String norm(java.lang.String path)
Somewhat complicated method to turn any path into a unique like path rooted at "/".- Parameters:
path- Non-null;- Returns:
- See above.
-
matches
public boolean matches(java.io.File file)
-
file
public java.io.File file()
-
basename
public java.lang.String basename()
-
dirname
public java.lang.String dirname()
-
fullname
public java.lang.String fullname()
-
hasher
public ome.model.enums.ChecksumAlgorithm hasher()
-
hash
public java.lang.String hash()
-
length
public long length()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-