public class URLResource
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLASSLOADER |
static java.lang.String |
URI |
static java.lang.String |
URI_CLASSLOADER |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
absolutePath() |
boolean |
canExecute() |
java.lang.String |
canonicalPath() |
boolean |
canRead() |
boolean |
canWrite() |
static FileResource |
create(Ruby runtime,
java.lang.String pathname,
boolean asFile) |
static FileResource |
createClassloaderURI(Ruby runtime,
java.lang.String pathname,
boolean asFile) |
int |
errno() |
boolean |
exists() |
static java.net.URL |
getResourceURL(Ruby runtime,
java.lang.String location) |
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() |
java.nio.channels.Channel |
openChannel(ModeFlags flags,
int perm) |
jnr.posix.FileStat |
stat() |
public static java.lang.String URI
public static java.lang.String CLASSLOADER
public static java.lang.String URI_CLASSLOADER
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 java.nio.channels.Channel openChannel(ModeFlags flags, int perm) throws ResourceException
ResourceExceptionpublic static FileResource createClassloaderURI(Ruby runtime, java.lang.String pathname, boolean asFile)
public static FileResource create(Ruby runtime, java.lang.String pathname, boolean asFile)
public static java.net.URL getResourceURL(Ruby runtime, java.lang.String location)
public boolean canExecute()
canExecute in interface FileResourcepublic int errno()
errno in interface FileResourcepublic java.io.InputStream inputStream()
throws ResourceException
FileResourceinputStream in interface FileResourceResourceException - is the file does not exists or if the resource is a directoryCopyright © 2001-2018 JRuby. All Rights Reserved.