Expand description
Default output path resolution + “Reveal in Finder/Explorer/Files” plumbing for M-EXPORT.4 (M-RECORD-EXPORT).
Pure-Rust path math + a std::process::Command wrapper for the
per-OS file-manager reveal. The user-pickable output directory
(M-SAVE.0) layers on top via
recorder_settings.
Functions§
- default_
basename - Compose the extension-less base filename for a session that
started at
started_at(Unix epoch seconds). FormatScreen-YYYY-MM-DD-HHMMSS— sortable, unambiguous, file-system- safe on every OS. M-SAVE.1’s Save panel appends the extension matching the chosen export format. - default_
filename - Compose a default output filename for a session that started at
started_at(Unix epoch seconds).default_basename+ the format’s extension (e.g.Screen-2026-05-25-123700.mp4). - default_
output_ dir - Default output directory for new recordings. macOS uses
~/Movies/Screen/; Windows + Linux use~/Videos/Screen/. Honors theSCREEN_RECORDER_OUTPUT_DIRenv var for tests and power users. - default_
output_ path - Compose the full default output path. The directory is created on first use by the encoder; this just returns the path.
- ensure_
parent_ dir - Ensure the parent directory of
pathexists, creating it recursively if needed. Used by the encoder before opening the scratch files. - move_
file - Move
srctodst, creatingdst’s parent directory first. Used by M-SAVE.1’s MP4 export path to promote the finalized scratch file into the user’s chosen folder. - reveal_
in_ file_ manager - Spawn the per-OS file-manager “reveal this file” command.
macOS uses
open -R <path>, Windows usesexplorer /select,<path>, Linux usesxdg-open <parent-dir>(most distros don’t have a portable “select” verb). - unix_
to_ 🔒ymdhms - Convert Unix epoch seconds to (year, month, day, hour, minute,
second) via a small pure-Rust algorithm. Avoids pulling in
chronofor this single-purpose use.