Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
aminalaee committed Feb 4, 2023
1 parent c404cb6 commit e3e85db
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/staticfiles.md
Expand Up @@ -3,12 +3,13 @@ Starlette also includes a `StaticFiles` class for serving files in a given direc

### StaticFiles

Signature: `StaticFiles(directory=None, packages=None, check_dir=True)`
Signature: `StaticFiles(directory=None, packages=None, check_dir=True, follow_symlink=False)`

* `directory` - A string or [os.Pathlike][pathlike] denoting a directory path.
* `packages` - A list of strings or list of tuples of strings of python packages.
* `html` - Run in HTML mode. Automatically loads `index.html` for directories if such file exist.
* `check_dir` - Ensure that the directory exists upon instantiation. Defaults to `True`.
* `follow_symlink` - A boolean indicating if symbolic links for files and directories should be followed. Defaults to `False`.

You can combine this ASGI application with Starlette's routing to provide
comprehensive static file serving.
Expand Down

0 comments on commit e3e85db

Please sign in to comment.