Velocidex / go-ntfs

An NTFS file parser in Go
Apache License 2.0
64 stars 23 forks source link

Return standard `io/fs` errors from FS operations #77

Closed tuxxi closed 1 year ago

tuxxi commented 1 year ago

Adhoc errors like "Not found" from here https://github.com/Velocidex/go-ntfs/blob/master/parser/mft.go#L123 are hard to check against.

Instead we should use or wrap the standard io/fs errors like ErrNotFound in cases like that. https://pkg.go.dev/io/fs#pkg-variables.

tuxxi commented 1 year ago

Nvm, I am confusing myself. This package doesn't expose an io/fs.FS so no need.