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