Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Function |local_filesystem

fs/local::|local_filesystem


Usage

|local_filesystem(path)

Parameters

↳ path: Option<string>

Return

↴ Option<FileSystem>


Create a local filesystem handle optionally rooted at path.

When path is Some, all file operations performed through the returned FileSystem are interpreted relative to that directory, and stay within it: .., absolute paths and links leading out of it are refused, links staying within it are followed. When path is None, paths are those of the process, absolute or relative to its working directory.

Returns None only when the underlying engine cannot be initialised, which in practice never happens for a local filesystem.