Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Apr 2, 2024
1 parent 3c9c75c commit cd0b98e
Showing 1 changed file with 30 additions and 29 deletions.
59 changes: 30 additions & 29 deletions README.md
Expand Up @@ -12,7 +12,7 @@
* Homepage: [https://40ants.com/reblocks-file-server/][f449]
* Bug tracker: [https://github.com/40ants/reblocks-file-server/issues][a450]
* Source control: [GIT][b09a]
* Depends on: [cl-fad][1059], [cl-ppcre][49b9], [reblocks][184b], [routes][48e8], [trivial-mimes][a154]
* Depends on: [cl-fad][1059], [cl-ppcre][49b9], [log4cl][7f8b], [reblocks][184b], [routes][48e8], [trivial-mimes][a154]

[![](https://github-actions.40ants.com/40ants/reblocks-file-server/matrix.svg?only=ci.run-tests)][4729]

Expand Down Expand Up @@ -80,7 +80,7 @@ In case if you want to serve all files except `*.txt`, you can negate filter exp

<a id="x-28-23A-28-2825-29-20BASE-CHAR-20-2E-20-22REBLOCKS-FILE-SERVER-2FCORE-22-29-20PACKAGE-29"></a>

#### [package](ca8a) `reblocks-file-server/core`
#### [package](d038) `reblocks-file-server/core`

<a id="x-28REBLOCKS-FILE-SERVER-DOCS-2FINDEX-3A-3A-7C-40REBLOCKS-FILE-SERVER-2FCORE-3FClasses-SECTION-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>

Expand All @@ -92,67 +92,67 @@ In case if you want to serve all files except `*.txt`, you can negate filter exp

<a id="x-28REBLOCKS-FILE-SERVER-2FCORE-3ASTATIC-FILES-ROUTE-20CLASS-29"></a>

###### [class](f301) `reblocks-file-server/core:static-files-route` (route)
###### [class](cfee) `reblocks-file-server/core:static-files-route` (route)

**Readers**

<a id="x-28REBLOCKS-FILE-SERVER-2FCORE-3AGET-DIR-LISTING-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-20REBLOCKS-FILE-SERVER-2FCORE-3ASTATIC-FILES-ROUTE-29-29"></a>

###### [reader](23a2) `reblocks-file-server/core:get-dir-listing` (static-files-route) (:dir-listing = t)
###### [reader](59cb) `reblocks-file-server/core:get-dir-listing` (static-files-route) (:dir-listing = t)

When nil, directory contents is not shown.

<a id="x-28REBLOCKS-FILE-SERVER-2FCORE-3AGET-FILTER-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-20REBLOCKS-FILE-SERVER-2FCORE-3ASTATIC-FILES-ROUTE-29-29"></a>

###### [reader](6f04) `reblocks-file-server/core:get-filter` (static-files-route) (:filter)
###### [reader](5a0e) `reblocks-file-server/core:get-filter` (static-files-route) (:filter)

A regular expression.

<a id="x-28REBLOCKS-FILE-SERVER-2FCORE-3AGET-FILTER-TYPE-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-20REBLOCKS-FILE-SERVER-2FCORE-3ASTATIC-FILES-ROUTE-29-29"></a>

###### [reader](13aa) `reblocks-file-server/core:get-filter-type` (static-files-route) (:filter-type = t)
###### [reader](9cbc) `reblocks-file-server/core:get-filter-type` (static-files-route) (:filter-type = t)

T means show files that match the filter regexp. `NIL` means hide files that match the filter regexp

<a id="x-28REBLOCKS-FILE-SERVER-2FCORE-3AGET-ROOT-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-20REBLOCKS-FILE-SERVER-2FCORE-3ASTATIC-FILES-ROUTE-29-29"></a>

###### [reader](b5aa) `reblocks-file-server/core:get-root` (static-files-route) (:root)
###### [reader](00f4) `reblocks-file-server/core:get-root` (static-files-route) (:root)

<a id="x-28REBLOCKS-FILE-SERVER-2FCORE-3AGET-URI-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-20REBLOCKS-FILE-SERVER-2FCORE-3ASTATIC-FILES-ROUTE-29-29"></a>

###### [reader](4ead) `reblocks-file-server/core:get-uri` (static-files-route) (:uri)
###### [reader](1db7) `reblocks-file-server/core:get-uri` (static-files-route) (:uri)

<a id="x-28REBLOCKS-FILE-SERVER-DOCS-2FINDEX-3A-3A-7C-40REBLOCKS-FILE-SERVER-2FCORE-3FGenerics-SECTION-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>

#### Generics

<a id="x-28REBLOCKS-FILE-SERVER-2FCORE-3ARENDER-404-20GENERIC-FUNCTION-29"></a>

##### [generic-function](2546) `reblocks-file-server/core:render-404` route uri
##### [generic-function](2a40) `reblocks-file-server/core:render-404` route uri

Returns a string with `HTML` for a case when `uri' wasn't found on the disk.

<a id="x-28REBLOCKS-FILE-SERVER-2FCORE-3ARENDER-DIRECTORY-20GENERIC-FUNCTION-29"></a>

##### [generic-function](df35) `reblocks-file-server/core:render-directory` route uri children
##### [generic-function](3e72) `reblocks-file-server/core:render-directory` route uri children

Renders a list of files in a directory

<a id="x-28REBLOCKS-FILE-SERVER-2FCORE-3ARENDER-STYLES-20GENERIC-FUNCTION-29"></a>

##### [generic-function](a050) `reblocks-file-server/core:render-styles` route
##### [generic-function](04aa) `reblocks-file-server/core:render-styles` route

This method should use reblocks/html:with-html and output a :style element.

<a id="x-28REBLOCKS-FILE-SERVER-2FCORE-3ASERVE-DIRECTORY-20GENERIC-FUNCTION-29"></a>

##### [generic-function](01b1) `reblocks-file-server/core:serve-directory` route uri full-path
##### [generic-function](4b8f) `reblocks-file-server/core:serve-directory` route uri full-path

Returns a Lack response with a rendered directory listing.

<a id="x-28REBLOCKS-FILE-SERVER-2FCORE-3ASERVE-FILE-20GENERIC-FUNCTION-29"></a>

##### [generic-function](751e) `reblocks-file-server/core:serve-file` route full-path
##### [generic-function](6cc9) `reblocks-file-server/core:serve-file` route full-path

Returns content of the file.

Expand All @@ -162,36 +162,37 @@ Returns content of the file.

<a id="x-28REBLOCKS-FILE-SERVER-2FCORE-3ALIST-DIRECTORY-20FUNCTION-29"></a>

##### [function](c9a7) `reblocks-file-server/core:list-directory` full-path filter filter-type
##### [function](9269) `reblocks-file-server/core:list-directory` full-path filter filter-type

Returns a list of files in the directory.
All items of the list are relative.

<a id="x-28REBLOCKS-FILE-SERVER-2FCORE-3AMAKE-ROUTE-20FUNCTION-29"></a>

##### [function](e5a3) `reblocks-file-server/core:make-route` &key (route-class 'static-files-route) (uri "/") (root "./") (dir-listing t) (filter ".\*") (filter-type t)
##### [function](1cfa) `reblocks-file-server/core:make-route` &key (route-class 'static-files-route) (uri "/") (root "./") (dir-listing t) (filter ".\*") (filter-type t)


[f449]: https://40ants.com/reblocks-file-server/
[b09a]: https://github.com/40ants/reblocks-file-server
[4729]: https://github.com/40ants/reblocks-file-server/actions
[ca8a]: https://github.com/40ants/reblocks-file-server/blob/cdb15070d5cefd171e868c593c5c510da1777dd6/src/core.lisp#L1
[c9a7]: https://github.com/40ants/reblocks-file-server/blob/cdb15070d5cefd171e868c593c5c510da1777dd6/src/core.lisp#L100
[f301]: https://github.com/40ants/reblocks-file-server/blob/cdb15070d5cefd171e868c593c5c510da1777dd6/src/core.lisp#L35
[b5aa]: https://github.com/40ants/reblocks-file-server/blob/cdb15070d5cefd171e868c593c5c510da1777dd6/src/core.lisp#L36
[4ead]: https://github.com/40ants/reblocks-file-server/blob/cdb15070d5cefd171e868c593c5c510da1777dd6/src/core.lisp#L39
[23a2]: https://github.com/40ants/reblocks-file-server/blob/cdb15070d5cefd171e868c593c5c510da1777dd6/src/core.lisp#L42
[6f04]: https://github.com/40ants/reblocks-file-server/blob/cdb15070d5cefd171e868c593c5c510da1777dd6/src/core.lisp#L47
[13aa]: https://github.com/40ants/reblocks-file-server/blob/cdb15070d5cefd171e868c593c5c510da1777dd6/src/core.lisp#L52
[e5a3]: https://github.com/40ants/reblocks-file-server/blob/cdb15070d5cefd171e868c593c5c510da1777dd6/src/core.lisp#L58
[01b1]: https://github.com/40ants/reblocks-file-server/blob/cdb15070d5cefd171e868c593c5c510da1777dd6/src/core.lisp#L80
[751e]: https://github.com/40ants/reblocks-file-server/blob/cdb15070d5cefd171e868c593c5c510da1777dd6/src/core.lisp#L84
[df35]: https://github.com/40ants/reblocks-file-server/blob/cdb15070d5cefd171e868c593c5c510da1777dd6/src/core.lisp#L88
[2546]: https://github.com/40ants/reblocks-file-server/blob/cdb15070d5cefd171e868c593c5c510da1777dd6/src/core.lisp#L92
[a050]: https://github.com/40ants/reblocks-file-server/blob/cdb15070d5cefd171e868c593c5c510da1777dd6/src/core.lisp#L96
[d038]: https://github.com/40ants/reblocks-file-server/blob/3c9c75c08b2f428afd6b447f80682c96c8969dac/src/core.lisp#L1
[9269]: https://github.com/40ants/reblocks-file-server/blob/3c9c75c08b2f428afd6b447f80682c96c8969dac/src/core.lisp#L101
[cfee]: https://github.com/40ants/reblocks-file-server/blob/3c9c75c08b2f428afd6b447f80682c96c8969dac/src/core.lisp#L36
[00f4]: https://github.com/40ants/reblocks-file-server/blob/3c9c75c08b2f428afd6b447f80682c96c8969dac/src/core.lisp#L37
[1db7]: https://github.com/40ants/reblocks-file-server/blob/3c9c75c08b2f428afd6b447f80682c96c8969dac/src/core.lisp#L40
[59cb]: https://github.com/40ants/reblocks-file-server/blob/3c9c75c08b2f428afd6b447f80682c96c8969dac/src/core.lisp#L43
[5a0e]: https://github.com/40ants/reblocks-file-server/blob/3c9c75c08b2f428afd6b447f80682c96c8969dac/src/core.lisp#L48
[9cbc]: https://github.com/40ants/reblocks-file-server/blob/3c9c75c08b2f428afd6b447f80682c96c8969dac/src/core.lisp#L53
[1cfa]: https://github.com/40ants/reblocks-file-server/blob/3c9c75c08b2f428afd6b447f80682c96c8969dac/src/core.lisp#L59
[4b8f]: https://github.com/40ants/reblocks-file-server/blob/3c9c75c08b2f428afd6b447f80682c96c8969dac/src/core.lisp#L81
[6cc9]: https://github.com/40ants/reblocks-file-server/blob/3c9c75c08b2f428afd6b447f80682c96c8969dac/src/core.lisp#L85
[3e72]: https://github.com/40ants/reblocks-file-server/blob/3c9c75c08b2f428afd6b447f80682c96c8969dac/src/core.lisp#L89
[2a40]: https://github.com/40ants/reblocks-file-server/blob/3c9c75c08b2f428afd6b447f80682c96c8969dac/src/core.lisp#L93
[04aa]: https://github.com/40ants/reblocks-file-server/blob/3c9c75c08b2f428afd6b447f80682c96c8969dac/src/core.lisp#L97
[a450]: https://github.com/40ants/reblocks-file-server/issues
[1059]: https://quickdocs.org/cl-fad
[49b9]: https://quickdocs.org/cl-ppcre
[7f8b]: https://quickdocs.org/log4cl
[184b]: https://quickdocs.org/reblocks
[48e8]: https://quickdocs.org/routes
[a154]: https://quickdocs.org/trivial-mimes
Expand Down

0 comments on commit cd0b98e

Please sign in to comment.