public class FileLocation extends AbstractLocation implements BrowsableLocation
| Constructor and Description | 
|---|
| FileLocation(File file) | 
| FileLocation(String path) | 
| FileLocation(URI path) | 
| Modifier and Type | Method and Description | 
|---|---|
| FileLocation | child(String name)Obtains a location with the given name, for whom this location is the
 parent. | 
| Set<BrowsableLocation> | children()Obtains a collection of locations for whom this location is the parent. | 
| File | getFile()Gets the associated  File. | 
| String | getName()Gets a (typically short) name expressing this location. | 
| URI | getURI()Gets the location expressed as a  URI, or null if the location
 cannot be expressed as such. | 
| boolean | isDirectory()Tests whether this location is a directory, meaning that it can have
 children. | 
| FileLocation | parent()Obtains a location pointing to the parent directory of this one. | 
| FileLocation | sibling(String path)Obtains a location relative to this one, which will be configured
 like the current location, but point to a the file specified by the
  pathparameter. | 
equals, hashCode, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitdefaultNamepublic FileLocation(File file)
public FileLocation(String path)
public FileLocation(URI path)
public URI getURI()
LocationURI, or null if the location
 cannot be expressed as such.public String getName()
Locationpublic FileLocation parent() throws IOException
BrowsableLocationparent in interface BrowsableLocationnull if this
         location has no parent.IOException - if something goes wrong obtaining the parent.public Set<BrowsableLocation> children() throws IOException
BrowsableLocationBrowsableLocation.isDirectory() on this
 location return true.children in interface BrowsableLocationCollections.EMPTY_SET if this location has no children.IOException - if something goes wrong obtaining the children.public FileLocation sibling(String path)
BrowsableLocationpath parameter.sibling in interface BrowsableLocationpath - the relative path of the desired location.public FileLocation child(String name)
BrowsableLocationBrowsableLocation.isDirectory()
 on this location return true.child in interface BrowsableLocationname - the name of the childpublic boolean isDirectory()
BrowsableLocationBrowsableLocation.child(String) or BrowsableLocation.children(), to ensure those calls
 succeed.isDirectory in interface BrowsableLocationCopyright © 2015–2022 SciJava. All rights reserved.