CrossClj

1.1.44 docs

SourceDocs



RECENT
    VARS
    available-media-types
    dir-index
    dir-properties
    filename-ext
    maybe-redirect-to-index
    new-directory-resource
    new-file-resource
    PathCoercion
    respond-with-file
    safe-relative-file
    safe-relative-path
    with-newline

    « Index of all namespaces of this project

    (available-media-types suffix)
    (dir-index dir content-type)
    (dir-properties dir ctx)
    Return properties of directory
    
    (filename-ext filename)
    Returns the file extension of a filename or filepath.
    
    Private
    (maybe-redirect-to-index dir req index-files)
    (new-directory-resource dir {:keys [custom-suffices index-files]})
    Inputs: [dir :- File {:keys [custom-suffices index-files]} :- {(s/optional-key :custom-suffices) {String {(s/optional-key :reader) (s/=> s/Any File Representation), :produces [Representation]}}, (s/optional-key :index-files) [String]}]
    
    (new-file-resource file {:keys [reader produces]})
    Inputs: [file :- File {:keys [reader produces]} :- {(s/optional-key :reader) (s/=> s/Any File Representation), (s/optional-key :produces) [Representation]}]
    
    protocol
    (as-path _)
    Coerce to java.nio.file.Path
    
    (respond-with-file ctx file reader)
    (safe-relative-file parent path)
    (safe-relative-path parent path)
    Given a parent java.nio.file.Path, return a child that is
    guaranteed not to ascend the parent. This is to ensure access cannot
    be made to files outside of the parent root.
    (with-newline s)