public DirectoryBrowserSupport doWs( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException, InterruptedException {
        checkPermission(Item.WORKSPACE);
        FilePath ws = getSomeWorkspace();
        if ((ws == null) || (!ws.exists())) {
            // if there's no workspace, report a nice error message
            // Would be good if when asked for *plain*, do something else!
            // (E.g. return 404, or send empty doc.)
            // Not critical; client can just check if content type is not text/plain,
            // which also serves to detect old versions of Hudson.
            req.getView(this,"noWorkspace.jelly").forward(req,rsp);
            return null;
        } else {
            Computer c = ws.toComputer();
            String title;
            if (c == null) {
                title = Messages.AbstractProject_WorkspaceTitle(getDisplayName());
            } else {
                title = Messages.AbstractProject_WorkspaceTitleOnComputer(getDisplayName(), c.getDisplayName());
            }
            return new DirectoryBrowserSupport(this, ws, title, "folder.png", true);
        }
    }
public DirectoryBrowserSupport doWs ( StaplerRequest req , StaplerResponse rsp ) throws IOException , ServletException , InterruptedException { checkPermission ( Item . WORKSPACE ) ; FilePath ws = getSomeWorkspace ( ) ; if ( ( ws == null ) || ( ! ws . exists ( ) ) ) { req . getView ( this , "noWorkspace.jelly" ) . forward ( req , rsp ) ; return null ; } else { Computer c = ws . toComputer ( ) ; String title ; if ( c == null ) { title = Messages . AbstractProject_WorkspaceTitle ( getDisplayName ( ) ) ; } else { title = Messages . AbstractProject_WorkspaceTitleOnComputer ( getDisplayName ( ) , c . getDisplayName ( ) ) ; } return new DirectoryBrowserSupport ( this , ws , title , "folder.png" , true ) ; } }
Serves the workspace files.