Package snap.web
Class DirSite
java.lang.Object
snap.web.WebSite
snap.web.DirSite
A data source implementation that draws from a directory WebFile.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
doDelete
(WebRequest aReq, WebResponse aResp) Handle DELETE request.protected void
doGetOrHead
(WebRequest aReq, WebResponse aResp, boolean isHead) Handles a get or head request.protected void
doPut
(WebRequest aReq, WebResponse aResp) Handle PUT request.protected void
fileDidReset
(WebFile aFile) Override to forward to dir file.getDir()
Returns the directory file this site represents.protected File
getJavaFileForUrl
(WebURL aURL) Override to get Java file from dir file.protected void
saveLastModTimeForFile
(WebFile aFile, long aTime) Override to forward to dir site.Methods inherited from class snap.web.WebSite
addFileChangeListener, createFileForPath, deleteFile, deleteSite, doPost, fileDidPropChange, firePropChange, flush, getExists, getFileForFileHeader, getFileForPath, getFileForPathImpl, getHostName, getLocalFile, getName, getPassword, getPath, getProp, getResponse, getRootDir, getSandboxSite, getSandboxSiteName, getURL, getUrlAddress, getUrlForPath, getUserName, removeFileChangeListener, resetFiles, saveFile, setPassword, setProp, setURL, setUserName, toString
-
Constructor Details
-
DirSite
public DirSite()Constructor.
-
-
Method Details
-
getDir
Returns the directory file this site represents. -
doGetOrHead
Handles a get or head request.- Specified by:
doGetOrHead
in classWebSite
-
doPut
Handle PUT request. -
doDelete
Handle DELETE request. -
saveLastModTimeForFile
Override to forward to dir site.- Overrides:
saveLastModTimeForFile
in classWebSite
- Throws:
Exception
-
getJavaFileForUrl
Override to get Java file from dir file.- Overrides:
getJavaFileForUrl
in classWebSite
-
fileDidReset
Override to forward to dir file.- Overrides:
fileDidReset
in classWebSite
-