Package snap.web

Class FileSite


public class FileSite extends WebSite
This class is a WebSite implementation for local file system.
  • Constructor Details

    • FileSite

      public FileSite()
      Constructor.
  • Method Details

    • setURL

      public void setURL(WebURL aURL)
      Override to set drive letter path on Windows.
      Overrides:
      setURL in class WebSite
    • doGetOrHead

      protected void doGetOrHead(WebRequest aReq, WebResponse aResp, boolean isHead)
      Handle a get or head request.
      Specified by:
      doGetOrHead in class WebSite
    • getFileHeaderForJavaFile

      protected FileHeader getFileHeaderForJavaFile(File javaFile)
      Returns the file header for given path and java file.
    • getFileHeadersForJavaFile

      protected FileHeader[] getFileHeadersForJavaFile(File parentFile)
      Returns the child file headers at given path.
    • doPut

      protected void doPut(WebRequest aReq, WebResponse aResp)
      Handle a PUT request.
      Overrides:
      doPut in class WebSite
    • doDelete

      protected void doDelete(WebRequest aReq, WebResponse aResp)
      Handle a DELETE request.
      Overrides:
      doDelete in class WebSite
    • saveLastModTimeForFile

      protected void saveLastModTimeForFile(WebFile aFile, long aTime) throws Exception
      Saves the modified time for a file to underlying file system.
      Overrides:
      saveLastModTimeForFile in class WebSite
      Throws:
      Exception
    • getJavaFileForUrl

      protected File getJavaFileForUrl(WebURL aURL)
      Returns the Java file for a WebURL.
      Overrides:
      getJavaFileForUrl in class WebSite
    • getJavaFileForLocalPath

      protected File getJavaFileForLocalPath(String filePath)
      Returns the Java file for given local file path.
    • getLocalPathForJavaFile

      protected String getLocalPathForJavaFile(File javaFile)
      Returns the local file path for given java file.