Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsDirectory ¶
IsDirectory checks whether the given path refers to a directory. If the path is a URL, it returns false with no error. The statFunc parameter allows for custom file stat implementations; if nil, os.Stat is used. Returns true if the path is a directory, false otherwise, along with any error encountered.
func IsURL ¶
IsURL checks whether the given path string is a valid HTTP or HTTPS URL. It returns true if the path starts with "http" (case-insensitive) and can be parsed as a valid URL, otherwise it returns false.
func Join ¶
Join concatenates the provided path elements into a single file path, separating them with a forward slash ('/'), and normalizes the resulting path. It returns the normalized file path as a string.
func NormalizeFilePath ¶
NormalizeFilePath normalizes a file path by removing any prefix before a colon (':'), and replacing all backslashes ('\') with forward slashes ('/'). This is useful for ensuring consistent file path formatting across different operating systems.
func PathExists ¶
PathExists checks whether the specified file or directory exists at the given path. It uses the provided statFunc to retrieve file information. If statFunc is nil, os.Stat is used by default. Returns true if the path exists, false otherwise.
Types ¶
This section is empty.