public class ClasspathResource
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASSPATH |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
absolutePath() |
boolean |
canExecute() |
java.lang.String |
canonicalPath() |
boolean |
canRead() |
boolean |
canWrite() |
static FileResource |
create(java.lang.String pathname) |
int |
errno() |
boolean |
exists() |
static java.net.URL |
getResourceURL(java.lang.String pathname) |
JRubyFile |
hackyGetJRubyFile() |
java.io.InputStream |
inputStream()
Opens a new input stream to read the contents of a resource and returns it.
|
boolean |
isDirectory() |
boolean |
isFile() |
boolean |
isSymLink() |
long |
lastModified() |
long |
length() |
java.lang.String[] |
list() |
jnr.posix.FileStat |
lstat() |
ChannelDescriptor |
openDescriptor(ModeFlags flags,
int perm) |
jnr.posix.FileStat |
stat() |
public static final java.lang.String CLASSPATH
public static java.net.URL getResourceURL(java.lang.String pathname)
public static FileResource create(java.lang.String pathname)
public java.lang.String absolutePath()
public java.lang.String canonicalPath()
public boolean exists()
public boolean isDirectory()
public boolean isFile()
public long lastModified()
public long length()
public boolean canRead()
public boolean canWrite()
public java.lang.String[] list()
File.list()
public boolean isSymLink()
public jnr.posix.FileStat stat()
public jnr.posix.FileStat lstat()
public JRubyFile hackyGetJRubyFile()
public ChannelDescriptor openDescriptor(ModeFlags flags, int perm) throws ResourceException
ResourceException
public boolean canExecute()
canExecute
in interface FileResource
public int errno()
errno
in interface FileResource
public java.io.InputStream inputStream() throws ResourceException
FileResource
inputStream
in interface FileResource
ResourceException
- is the file does not exists or if the resource is a directoryCopyright © 2002-2009 JRuby Team. All Rights Reserved.