Modifier and Type | Field and Description |
---|---|
private File | |
private File | |
private static final FileUtils | |
private static final int |
Access | Constructor and Description |
---|---|
public | |
public | FileResource(File
the basedir as File. b, String the relative filename. name)Construct a new FileResource using the specified basedir and relative name. |
public | |
public | |
public | FileResource(Project
the Project against which to resolve p, String s .the absolute or Project-relative filename as a String. s)Constructor for Ant attribute introspection. |
Modifier and Type | Method and Description |
---|---|
public int | Returns: a negative integer, zero, or a positive integer as this FileResource is less than, equal to, or greater than the specified Resource.the other Resource against which to compare. another)Overrides org. Implements java. |
public boolean | Returns: true if another is a FileResource representing the same file.the other Object to compare. another)Overrides org. |
public OutputStream | getAppendOutputStream()
Implements org. |
public File | |
public File | Returns: the File.Implements org. |
public InputStream | Returns: an InputStream object.Overrides org. |
public long | Returns: 0 if the resource does not exist.Overrides org. |
public String | Returns: the name of this resource.Overrides org. |
protected File | Returns: the not-null File.Get the file represented by this FileResource, ensuring it is not null. |
public OutputStream | Returns: an OutputStream to which content can be written.Overrides org. |
private OutputStream | |
protected FileResource | getRef()
Overrides org. |
public Resource | Returns: a new resource of type FileResourcerelative/absolute path to a resource path)Implements org. |
public long | Returns: the size, as a long, 0 if the Resource does not exist.Overrides org. |
public int | Returns: hash code as int.Overrides org. |
public boolean | Returns: boolean flag indicating if the resource is a directory. |
public boolean | Returns: true if this resource exists.Overrides org. |
public boolean | Returns: whether this Resource is a FileResource.Overrides org. Implements org. |
public void | |
public void | |
public void | setRefid(Reference
the Reference to set. r)Overrides org. |
public String | Returns: this FileResource formatted as a String.Overrides org. |
public void | touch(long
new last modification time. modTime)Implements org. |
baseDir | back to summary |
---|---|
private File baseDir |
file | back to summary |
---|---|
private File file |
FILE_UTILS | back to summary |
---|---|
private static final FileUtils FILE_UTILS |
NULL_FILE | back to summary |
---|---|
private static final int NULL_FILE |
FileResource | back to summary |
---|---|
public FileResource() Default constructor. |
FileResource | back to summary |
---|---|
public FileResource(File b, String name) Construct a new FileResource using the specified basedir and relative name. |
FileResource | back to summary |
---|---|
public FileResource(File f) Construct a new FileResource from a File.
|
FileResource | back to summary |
---|---|
public FileResource(Project p, File f) Create a new FileResource. |
FileResource | back to summary |
---|---|
public FileResource(Project p, String s) Constructor for Ant attribute introspection.
|
compareTo | back to summary |
---|---|
public int compareTo(Resource another) Overrides org. Implements java. Compare this FileResource to another Resource. |
equals | back to summary |
---|---|
public boolean equals(Object another) Overrides org. Compare another Object to this FileResource for equality. |
getAppendOutputStream | back to summary |
---|---|
public OutputStream getAppendOutputStream() throws IOException Implements org. Doc from org. Get an appending OutputStream.
|
getBaseDir | back to summary |
---|---|
public File getBaseDir() Return the basedir to which the name is relative.
|
getFile | back to summary |
---|---|
public File getFile() Implements org. Get the file represented by this FileResource. |
getInputStream | back to summary |
---|---|
public InputStream getInputStream() throws IOException Overrides org. Return an InputStream for reading the contents of this Resource.
|
getLastModified | back to summary |
---|---|
public long getLastModified() Overrides org. Get the modification time in milliseconds since 01.01.1970 .
|
getName | back to summary |
---|---|
public String getName() Overrides org. Get the name of this FileResource. If the basedir is set, the name will be relative to that. Otherwise the basename only will be returned. |
getNotNullFile | back to summary |
---|---|
protected File getNotNullFile() Get the file represented by this FileResource, ensuring it is not null.
|
getOutputStream | back to summary |
---|---|
public OutputStream getOutputStream() throws IOException Overrides org. Get an OutputStream for the Resource.
|
getOutputStream | back to summary |
---|---|
private OutputStream getOutputStream(boolean append) throws IOException |
getRef | back to summary |
---|---|
protected FileResource getRef() Overrides org. Doc from org. Perform the check for circular references and return the referenced Resource.
|
getResource | back to summary |
---|---|
public Resource getResource(String path) Implements org. Create a new resource that matches a relative or absolute path. If the current instance has a compatible baseDir attribute, it is copied.
|
getSize | back to summary |
---|---|
public long getSize() Overrides org. Get the size of this Resource.
|
hashCode | back to summary |
---|---|
public int hashCode() Overrides org. Get the hash code for this Resource.
|
isDirectory | back to summary |
---|---|
public boolean isDirectory() Overrides org. Learn whether the resource is a directory.
|
isExists | back to summary |
---|---|
public boolean isExists() Overrides org. Learn whether this file exists.
|
isFilesystemOnly | back to summary |
---|---|
public boolean isFilesystemOnly() Overrides org. Implements org. Fulfill the ResourceCollection contract.
|
setBaseDir | back to summary |
---|---|
public void setBaseDir(File b) Set the basedir for this FileResource.
|
setFile | back to summary |
---|---|
public void setFile(File f) Set the File for this FileResource.
|
setRefid | back to summary |
---|---|
public void setRefid(Reference r) Overrides org. Overrides the super version. |
toString | back to summary |
---|---|
public String toString() Overrides org. Get the string representation of this Resource. |
touch | back to summary |
---|---|
public void touch(long modTime) Implements org. Implement the Touchable interface.
|