Files Module
The files module can be used to serve from the file system. It encapsulates common patterns like verifying that back-symlinks or keywords aren't used to gain access outside the intended folder.
Functions and values
| Function or value | Description |
|
The current implementation doesn't take kindly to relative paths.
|
Full Usage:
browseFile rootPath fileName
Parameters:
string
fileName : string
Returns: WebPart
|
|
|
|
|
|
|
The current implementation doesn't take kindly to relative paths.
|
|
|
|
|
Full Usage:
fileEtag fileName
Parameters:
string
Returns: string
|
Compute a weak ETag for the file at the given path from its length and
last-write time. This is cheap (no file hashing), stable across processes,
and invalidates automatically when the file is modified. Used by
|
Full Usage:
resolvePath rootPath fileName
Parameters:
string
fileName : string
Returns: string
|
The current implementation doesn't take kindly to relative paths.
|
Full Usage:
sendFile fileName compression
Parameters:
string
compression : bool
Returns: WebPart
|