object Resource
Resource file manager.
- Alphabetic
- By Inheritance
- Resource
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- case class FileInJar(resourceURL: URL, logicalPath: String, isDirectory: Boolean) extends VirtualFile with Product with Serializable
A virtual file implementation for file resources contained in a JAR file
- case class SystemFile(file: File, logicalPath: String) extends VirtualFile with Product with Serializable
A virtual file implementation for usual files
- trait VirtualFile extends AnyRef
VirtualFile is a common interface to handle system files and file resources in JAR.
VirtualFile is a common interface to handle system files and file resources in JAR.
System file resources have an URL prefixed with "file:". e.g., "file:/C:/Program Files/Software/classes/org/xerial/util/FileResource.java" JAR file contents have an URL prefixed with "jar:file: e.g., "jar:file:/C:/Program Files/Software/something.jar!/org/xerial/util/FileResource.java"
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def find(packageName: String, resourceFileName: String): Option[URL]
Finds the java.net.URL of the resource
Finds the java.net.URL of the resource
- packageName
the base package name to find the resource
- resourceFileName
the resource file name relative to the package folder
- returns
the URL of the specified resource
- def find(absoluteResourcePath: String): Option[URL]
Find a resource from the give absolute path
- def find(referenceClass: Class[_], resourceFileName: String): Option[URL]
- def findClasses[A](searchPath: Package, toSearch: Class[A], classLoader: ClassLoader): Seq[Class[A]]
- def findClasses[A](packageName: String, toSearch: Class[A], classLoader: ClassLoader = Thread.currentThread.getContextClassLoader): Seq[Class[A]]
- def findResourceURLs(cl: ClassLoader, name: String): Seq[URL]
Find resource URLs that can be found from a given class loader and its ancestors
Find resource URLs that can be found from a given class loader and its ancestors
- cl
class loader
- name
resource name
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def listResources(packageName: String, resourceFilter: (String) => Boolean, classLoader: ClassLoader = Thread.currentThread.getContextClassLoader): Seq[VirtualFile]
Collect resources under the given package
- def listResources(packageName: String): Seq[VirtualFile]
Collect resources under the given package
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- def open[U](referenceClass: Class[_], resourceFileName: String)(body: (BufferedInputStream) => U): U
Open a resource as a stream, then execute the code block using the stream
Open a resource as a stream, then execute the code block using the stream
- referenceClass
context class to specify the package containing the resource file
- resourceFileName
file name
- body
code block
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)