Skip to content

Emit position of actual file size when watching#111

Open
th0m4s wants to merge 1 commit intolucagrulla:masterfrom
th0m4s:master
Open

Emit position of actual file size when watching#111
th0m4s wants to merge 1 commit intolucagrulla:masterfrom
th0m4s:master

Conversation

@th0m4s
Copy link

@th0m4s th0m4s commented Aug 19, 2020

When starting to read a file from a specific position, I needed to know where to display a button to the user to load the start of the file, but I used a second fs.stat which led to some weird behaviours if the file is being written rapidly.

To counter that, I created an event, watch, which is emitted when the file is being read at a specific position (in the watch function), so I could use that number later to retrieve the start of the file.

I didn't find another idea for the name, be pleased to rename it if necessary.

Thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant