public class URLResource extends java.lang.Object implements FileResource
| 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) |
java.nio.file.attribute.FileTime |
creationTime() |
boolean |
equals(java.lang.Object obj) |
int |
errno() |
boolean |
exists() |
static java.net.URL |
getResourceURL(Ruby runtime,
java.lang.String location) |
int |
hashCode() |
boolean |
isDirectory() |
boolean |
isFile() |
boolean |
isSymLink() |
java.nio.file.attribute.FileTime |
lastAccessTime() |
long |
lastModified() |
java.nio.file.attribute.FileTime |
lastModifiedTime() |
long |
length() |
java.lang.String[] |
list() |
jnr.posix.FileStat |
lstat() |
java.nio.channels.Channel |
openChannel(int flags,
int perm) |
java.io.InputStream |
openInputStream()
Opens a new input stream to read the contents of a resource and returns it.
|
jnr.posix.FileStat |
stat() |
java.lang.String |
toString() |
<T> T |
unwrap(java.lang.Class<T> type)
Unwrap the resource backend (replacement for
FileResource.hackyGetJRubyFile()). |
clone, finalize, getClass, notify, notifyAll, wait, wait, waithackyGetJRubyFile, inputStream, isNull, openChannel, wrappublic static java.lang.String URI
public static java.lang.String CLASSLOADER
public static java.lang.String URI_CLASSLOADER
public java.lang.String absolutePath()
absolutePath in interface FileResourcepublic java.lang.String canonicalPath()
canonicalPath in interface FileResourcepublic boolean exists()
exists in interface FileResourcepublic boolean isDirectory()
isDirectory in interface FileResourcepublic boolean isFile()
isFile in interface FileResourcepublic long length()
length in interface FileResourcepublic boolean canRead()
canRead in interface FileResourcepublic boolean canWrite()
canWrite in interface FileResourcepublic boolean canExecute()
canExecute in interface FileResourcepublic java.lang.String[] list()
list in interface FileResourceFile.list()public boolean isSymLink()
isSymLink in interface FileResourcepublic long lastModified()
lastModified in interface FileResourcepublic java.nio.file.attribute.FileTime lastModifiedTime()
public java.nio.file.attribute.FileTime lastAccessTime()
public java.nio.file.attribute.FileTime creationTime()
public int errno()
errno in interface FileResourcepublic jnr.posix.FileStat stat()
stat in interface FileResourcepublic jnr.posix.FileStat lstat()
lstat in interface FileResourcepublic <T> T unwrap(java.lang.Class<T> type)
throws java.lang.UnsupportedOperationException
FileResourceFileResource.hackyGetJRubyFile()).unwrap in interface FileResourcejava.lang.UnsupportedOperationExceptionpublic java.io.InputStream openInputStream()
throws java.io.IOException
FileResourceopenInputStream in interface FileResourcejava.io.IOExceptionpublic java.nio.channels.Channel openChannel(int flags,
int perm)
throws java.io.IOException
openChannel in interface FileResourcejava.io.IOExceptionpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic 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)
Copyright © 2001-2019 JRuby. All Rights Reserved.