pub enum FsScope {
AllowedPaths(Vec<PathBuf>),
Scope {
allow: Vec<PathBuf>,
deny: Vec<PathBuf>,
require_literal_leading_dot: Option<bool>,
},
}
Expand description
Protocol scope definition. It is a list of glob patterns that restrict the API access from the webview.
Each pattern can start with a variable that resolves to a system base directory.
The variables are: $AUDIO
, $CACHE
, $CONFIG
, $DATA
, $LOCALDATA
, $DESKTOP
,
$DOCUMENT
, $DOWNLOAD
, $EXE
, $FONT
, $HOME
, $PICTURE
, $PUBLIC
, $RUNTIME
,
$TEMPLATE
, $VIDEO
, $RESOURCE
, $APP
, $LOG
, $TEMP
, $APPCONFIG
, $APPDATA
,
$APPLOCALDATA
, $APPCACHE
, $APPLOG
.
Variants§
AllowedPaths(Vec<PathBuf>)
A list of paths that are allowed by this scope.
Scope
A complete scope configuration.
Fields
deny: Vec<PathBuf>
A list of paths that are not allowed by this scope.
This gets precedence over the Self::Scope::allow
list.
require_literal_leading_dot: Option<bool>
Whether or not paths that contain components that start with a .
will require that .
appears literally in the pattern; *
, ?
, **
,
or [...]
will not match. This is useful because such files are
conventionally considered hidden on Unix systems and it might be
desirable to skip them when listing files.
Defaults to true
on Unix systems and false
on Windows