JarRepository

play.doc.JarRepository
class JarRepository(jarFile: JarFile, base: Option[String]) extends FileRepository

Jar file implementation of the repository

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def close(): Unit
def findFileWithName(name: String): Option[String]

Find a file with the given name. The repositories directory structure is searched, and the path of the first file found with that name is returned.

Find a file with the given name. The repositories directory structure is searched, and the path of the first file found with that name is returned.

Value parameters

name

The name of the file to find

Attributes

Returns

The path of the file, or None if it couldn't be found

def getEntry(path: String): Option[(ZipEntry, InputStream)]
def handleFile[A](path: String)(handler: FileHandle => A): Option[A]

Load a file using the given handler. If the file is found then the file will be opened and handler will be called with the file's handle. The handler must call the close method on the handle to ensure that the file is closed properly.

Load a file using the given handler. If the file is found then the file will be opened and handler will be called with the file's handle. The handler must call the close method on the handle to ensure that the file is closed properly.

Value parameters

handler

The handler to handle the file

path

The path of the file to load

Attributes

Returns

The file, as loaded by the loader, or None if the doesn't exist

def loadFile[A](path: String)(loader: InputStream => A): Option[A]

Load a file using the given loader. If the file is found then the file will be opened and loader will be called with its content. The file will be closed automatically when loader returns a value or throws an exception.

Load a file using the given loader. If the file is found then the file will be opened and loader will be called with its content. The file will be closed automatically when loader returns a value or throws an exception.

Value parameters

loader

The loader to load the file

path

The path of the file to load

Attributes

Returns

The file, as loaded by the loader, or None if the doesn't exist

override def toString(): String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any