Smutty


Smutty.Smutty_Resource

Class Smutty_Resource

Smutty_Object
|
+--Smutty_Resource

public class Smutty_Resource
extends Smutty_Object

this class handles access to "resources". which in Smutty is basically anthing in the "public" directory.

/


Method Summary
static String

getMimeType(String path)

returns the mime type for a specific file, determined by it's extension.

static nothing

output(String path)

this function can be used to output a resource to the user.

Method Detail

getMimeType

public static String getMimeType(String path)

returns the mime type for a specific file, determined by it's extension. the path to the file doesn't have to be readable from the filesystem, it's just used as a string to extract the extension.

Parameters:
path - path to the file
Returns:
mime type
Go to code

output

public static nothing output(String path)

this function can be used to output a resource to the user. it will try and set http headers correctly for appropriate caching, and getting the mime type right, etc...

Parameters:
path - path of resource to output
Go to code

Smutty