package fd
import "github.com/cyphar/filepath-securejoin/pathrs-lite/internal/fd"
Package fd provides a drop-in interface-based replacement of *os.File that allows for things like noop-Close wrappers to be used.
Index ¶
Types ¶
type Fd ¶
Fd is an interface that mirrors most of the API of *os.File, allowing you to create wrappers that can be used in place of *os.File.
func NopCloser ¶
NopCloser returns an *os.File-like object where the Close method is now a no-op.
Note that for *os.File and similar objects, the Go garbage collector will still call Close on the underlying file unless you use runtime.SetFinalizer to disable this behaviour. This is up to the caller to do (if necessary).
Source Files ¶
- Version
- v0.5.1
- Published
- Nov 1, 2025
- Platform
- windows/amd64
- Imports
- 2 packages
- Last checked
- 1 hour ago –
Tools for package owners.