Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateFile ¶
CreateFile creates a new file at the specified path and optionally writes content to it. If the file already exists, it will be truncated before writing the content. Returns an error if any operation fails.
func Exists ¶
Exists checks if a file or directory at the specified path exists. It returns true if the path exists, false otherwise.
func ListFiles ¶
ListFiles lists the names of all files (not directories) in the specified directory. If a regex pattern is provided, only files matching the pattern are included. Returns a slice of file names and any error encountered.
func MustRead ¶
MustRead panics in case of any error. It is a convenience function that simplifies error handling for cases where errors are unexpected or should halt program execution. Use MustRead when you're confident the operation should not fail under normal conditions, such as reading embedded resources or files that are guaranteed to exist.
Types ¶
This section is empty.