public class ClasspathResource extends Object
Modifier and Type | Method and Description |
---|---|
String |
absolutePath() |
boolean |
canExecute() |
String |
canonicalPath() |
boolean |
canRead() |
boolean |
canWrite() |
static FileResource |
create(String pathname) |
int |
errno() |
boolean |
exists() |
static URL |
getResourceURL(String pathname) |
JRubyFile |
hackyGetJRubyFile() |
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() |
String[] |
list() |
jnr.posix.FileStat |
lstat() |
ChannelDescriptor |
openDescriptor(ModeFlags flags,
int perm) |
jnr.posix.FileStat |
stat() |
public static final String CLASSPATH
public static FileResource create(String pathname)
public String absolutePath()
public String canonicalPath()
public boolean exists()
public boolean isDirectory()
public boolean isFile()
public long lastModified()
public long length()
public boolean canRead()
public boolean canWrite()
public 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 InputStream inputStream() throws ResourceException
FileResource
inputStream
in interface FileResource
ResourceException
- is the file does not exists or if the resource is a directoryCopyright © 2001-2014 JRuby. All Rights Reserved.