Class FileResource
java.lang.Object
org.apache.ivy.plugins.repository.file.FileResource
- All Implemented Interfaces:
Resource
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClones this resource with a new resource with a different namebooleanexists()Determine if the resource is available.longGet the resource sizegetFile()longGet the date the resource was last modifiedgetName()Get the name of the resource.booleanisLocal()Is this resource local to this host, i.e.Opens a stream on this resourcetoString()
-
Constructor Details
-
FileResource
-
-
Method Details
-
getName
-
clone
-
getLastModified
public long getLastModified()Description copied from interface:ResourceGet the date the resource was last modified- Specified by:
getLastModifiedin interfaceResource- Returns:
- A
longvalue representing the time the file was last modified, measured in milliseconds since the epoch (00:00:00 GMT, January 1, 1970), or0Lif the file does not exist or if an I/O error occurs.
-
getContentLength
public long getContentLength()Description copied from interface:ResourceGet the resource size- Specified by:
getContentLengthin interfaceResource- Returns:
- a
longvalue representing the size of the resource in bytes.
-
exists
-
toString
-
getFile
-
getRepository
-
isLocal
-
openStream
Description copied from interface:ResourceOpens a stream on this resource- Specified by:
openStreamin interfaceResource- Returns:
- the opened input stream
- Throws:
IOException- if something goes wrong
-