Doctor 🤖
Doctor 🤖
DDeno
Created by Niterux on 11/28/2024 in #help
Questions about files and what happens when other programs writes to them
But idk if it would work
56 replies
DDeno
Created by Niterux on 11/28/2024 in #help
Questions about files and what happens when other programs writes to them
readable.getReader()
56 replies
DDeno
Created by Niterux on 11/28/2024 in #help
Questions about files and what happens when other programs writes to them
You could try that with a reader.
56 replies
DDeno
Created by Niterux on 11/28/2024 in #help
Questions about files and what happens when other programs writes to them
Why do you want to prevent it? You literally close it afterwards
56 replies
DDeno
Created by Niterux on 11/28/2024 in #help
Questions about files and what happens when other programs writes to them
It will still close itself when its exhausted
56 replies
DDeno
Created by Niterux on 11/28/2024 in #help
Questions about files and what happens when other programs writes to them
Prevent cancel is stopping the readable from being closed early if the for loop breaks out early.
56 replies
DDeno
Created by Niterux on 11/28/2024 in #help
Questions about files and what happens when other programs writes to them
Cancel and close are different.
56 replies
DDeno
Created by Niterux on 11/28/2024 in #help
Questions about files and what happens when other programs writes to them
I've only seen that for a writable stream
56 replies
DDeno
Created by Niterux on 11/28/2024 in #help
Questions about files and what happens when other programs writes to them
Because the readable stream property called closed when it finished.
56 replies
DDeno
Created by Niterux on 11/28/2024 in #help
Questions about files and what happens when other programs writes to them
File is already closed
56 replies
DDeno
Created by Niterux on 11/28/2024 in #help
Questions about files and what happens when other programs writes to them
That doesn't always apply to child processes though. Depends on the child.
56 replies
DDeno
Created by Niterux on 11/28/2024 in #help
Questions about files and what happens when other programs writes to them
No. When programs crash the OS is designed to clean up any resources they were using.
56 replies
DDeno
Created by Niterux on 11/28/2024 in #help
Questions about files and what happens when other programs writes to them
An alternative is to use the tail command on Linux and macOS and on windows use Get-Content -Path "path\to\your\file.txt" -Wait (according to ChatGPT). Both via the Deno.Command. You can stream their outputs.
56 replies
DDeno
Created by Niterux on 11/28/2024 in #help
Questions about files and what happens when other programs writes to them
When working with readable and writable streams on the file, they automatically call this function when they are closed themselves.
56 replies
DDeno
Created by Niterux on 11/28/2024 in #help
Questions about files and what happens when other programs writes to them
The close function is to indicate you're finished interacting with the file.
56 replies
DDeno
Created by Niterux on 11/28/2024 in #help
Questions about files and what happens when other programs writes to them
If you weren't using a readable stream and using the other read and write functions on it, then you'd call close to indicate that the file can be released. Otherwise it just hangs around in memory.
56 replies
DDeno
Created by Niterux on 11/28/2024 in #help
Questions about files and what happens when other programs writes to them
If the read program exits while the write program is still going then it doesn't work
56 replies
DDeno
Created by Niterux on 11/28/2024 in #help
Questions about files and what happens when other programs writes to them
One program to slowly make writes to it via a stream and another one to read from it via a stream.
56 replies
DDeno
Created by Niterux on 11/28/2024 in #help
Questions about files and what happens when other programs writes to them
Just make two programs to test its functionality.
56 replies
DDeno
Created by TaxBusby on 11/19/2024 in #help
Piping two TCP connections to each other
I'm not familiar with Deno.listen, but if you want a proxy why not use nginx?
5 replies