Libraries anvil system Resource

class Resource
extends anvil.lang.object
Resource represents resources stored in zone's containers. Resources may be obtained through anvil.system.rawImport().

Methods

binary getContent()
Gets the content of this resource.
Throws IOError -  If an I/O error occurs.

int getContentLength()
Gets the content length of this resource.

string getContentType()
Gets the content type of this resource.

InputStream getInputStream()
Gets an input stream that reads from this resource.
Throws IOError -  If an I/O error occurs.

Calendar getLastModified()
Gets the time of last modification.

getName()

string getPathinfo()
Returns the pathinfo of this resource.

URL getURL()
Returns the URL of this resource.

isDirectory()

list()

void writeTo(OutputStream output)
Writes the content to given output stream. This is possibly more effient than explicitly getting the content out of resource.
Throws IOError -  If an I/O error occurs.