Thanks Brian.

On Monday, December 11, 2023 at 8:13:26 AM UTC Brian Candler wrote:

> On Sunday 10 December 2023 at 16:41:00 UTC Jason E. Aten wrote:
>
> My question is: is there a way to have the Go process detect if the file 
> it is writing to has been deleted by another process (git in this case) so 
> that attempting to append to the file is no longer effective?
>
>
> On Unix, I'd fstat the open file, stat the file on disk by name, and 
> compare the inode numbers.
>
> In Go, it's easy enough to get FileInfo but you need to dig a bit into 
> Sys() to pull out the underlying Unix stat data.
> https://stackoverflow.com/questions/28339240/get-file-inode-in-go
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/8d5e7a23-579a-40db-b863-6d953256ea58n%40googlegroups.com.

Reply via email to