Open Kagami opened 10 months ago
There are: https://github.com/mpv-player/mpv/blob/22e21edbd40ed0f937ab3bb52d0aa18db7ef18f8/player/javascript/defaults.js#L708-L709 https://github.com/mpv-player/mpv/blob/22e21edbd40ed0f937ab3bb52d0aa18db7ef18f8/player/javascript.c#L1211-L1212
but no mp.utils.remove_file which is also very useful.
mp.utils.remove_file
Right now my workaround:
function remove_file(path: string) { if (mp.get_property("platform") === "windows") { mp.command_native({ name: "subprocess", args: ["del", path], playback_only: false, }); } else { mp.command_native({ name: "subprocess", args: ["rm", path], playback_only: false, }); } }
Also would be nice to have mkdir, rmdir, etc.
mkdir
rmdir
There are: https://github.com/mpv-player/mpv/blob/22e21edbd40ed0f937ab3bb52d0aa18db7ef18f8/player/javascript/defaults.js#L708-L709 https://github.com/mpv-player/mpv/blob/22e21edbd40ed0f937ab3bb52d0aa18db7ef18f8/player/javascript.c#L1211-L1212
but no
mp.utils.remove_file
which is also very useful.Right now my workaround: