Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotRegularFile = fmt.Errorf("not a regular file")
ErrNotRegularFile is returned when a path exists but is not a regular file.
Functions ¶
func IsRegularFile ¶
IsRegularFile returns true if path exists and is a regular file.
func OpenRegularFile ¶
OpenRegularFile opens path only if it is a regular file (not a symlink, dir, etc.). Uses Lstat→Open→Fstat(SameFile) to prevent TOCTOU symlink-swap attacks.
func ReadRegularFile ¶
ReadRegularFile reads path only if it is a regular file (not a symlink, dir, etc.).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.