System
The System APIs give you access to a set of methods for file operations, downloading and more.
Difficulty: Moderate
Some knowledge of the filesystem, platform differences is required
You can check out the type definition file to see the exhaustive list of methods available and use Go's documentation to learn how to use them.
Permissions
system
permission is required.
Allow lists
By default, all commands you may try to execute and all directories and files you may try to read to write to will be restricted. You need to explicitly declare which command and the arguments you want to execute and which directories/files you want to read or write to.
Paths
/path/to/dir/
- Matches only the specific directory/path/to/dir/*
- Matches all files in the directory, but not subdirectories/path/to/dir/**
- Matches all files and directories recursively/
path/to/dir/**/*
- Same as above, matches all files and directories recursively
Here are pre-defined directory variables
$TEMP - The temp directory
$CACHE - The cache directory (LocalAppData on Windows)
$HOME - The home directory (%USERPROFILE% on Windows)
$CONFIG - The user config directory (AppData on Windows)
$DOWNLOAD - The download directory
$DOCUMENT - The document directory
$DESKTOP - The desktop directory
$SEANIME_ANIME_LIBRARY - Any of the user's anime library paths
Last updated