Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateEmptyIfNotExists ¶
func CreateEmptyIfNotExists(filename string)
CreateEmptyIfNotExists creates an empty file with the given filename if it does not already exist. If the parent directory of the file does not exist, the function will create it. The function is useful for ensuring that a file is present before writing to it.
Example ¶
package main import ( "github.com/microsoft/go-sqlcmd/internal/io/file" "os" "path/filepath" ) func main() { filename := filepath.Join(os.TempDir(), "foo.txt") file.CreateEmptyIfNotExists(filename) }
func Exists ¶
Exists checks if a file with the given filename exists in the file system. It returns a boolean value indicating whether the file exists or not.
func Initialize ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.