ome.services.scripts
Class RepoFile

java.lang.Object
  extended by ome.services.scripts.RepoFile

public class RepoFile
extends Object

File type wrapper for paths which are intended for being stored in the database as a part of this repository.


Nested Class Summary
static class RepoFile.FsFile
          File type wrapper for actual OS files.
 
Constructor Summary
RepoFile(File root, File file)
          Both root and file are absolute paths to files.
RepoFile(File root, String path)
          Assumes that path is relative under root, and constructs a new RepoFile.FsFile and calls RepoFile(File, File)
 
Method Summary
 String basename()
           
 String dirname()
           
 File file()
           
 String fullname()
           
 long length()
           
 boolean matches(File file)
           
static String norm(String path)
          Somewhat complicated method to turn any path into a unique like path rooted at "/".
 String sha1()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RepoFile

public RepoFile(File root,
                String path)
Assumes that path is relative under root, and constructs a new RepoFile.FsFile and calls RepoFile(File, File)


RepoFile

public RepoFile(File root,
                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 String norm(String path)
Somewhat complicated method to turn any path into a unique like path rooted at "/".

Parameters:
path - Non-null;
Returns:

matches

public boolean matches(File file)

file

public File file()

basename

public String basename()

dirname

public String dirname()

fullname

public String fullname()

sha1

public String sha1()

length

public long length()

toString

public String toString()
Overrides:
toString in class Object


OmeroJava Api

Version: 4.3.4-dbcbce5a-b4

Copyright © 2009 The University of Dundee. All Rights Reserved.