Event emitter The defined events on documents including:
Ends the current file being written to.
Return the name of the SLP file currently being written or null if no file is being written to currently.
Returns the latest created file that was found by folder monitoring.
Starts watching a particular folder for slp files. It treats all new
.slp
files as though it's a live Slippi stream.
Updates the settings to be the desired ones passed in.
Generated using TypeDoc
SlpFolderStream is responsible for monitoring a folder, and detecting when a new SLP file is created and is written to. This creates essentially a fake live-stream by reading the SLP file as it's still being written to.
Typically when you detect changes to a file that is still being written to, you want to include a timeout where if the file isn't changed within that timeout, you consider it "done" and stop checking it. However, since players can pause Slippi games for an indefinite amount of time, we don't want to timeout since the file might still continue to be written to. So to achieve this, we use the package
tailstream
where we have to manually calldone()
when we no longer anticipate the file to change.