Documentation ¶
Overview ¶
Package fstest provides test utilties to operate with files and directories
Index ¶
- func Chmod(t *testing.T, name string, mode os.FileMode)
- func MkdirAll(t *testing.T, path string)
- func ReadFile(t *testing.T, path string) []byte
- func Symlink(t *testing.T, oldname, newname string)
- func TempDir(t *testing.T) string
- func WriteExecutable(t *testing.T, data []byte, path string)
- func WriteToFile(t *testing.T, data []byte, path string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TempDir ¶
TempDir returns a path, with all symlinks in it resolved, to a unique temporary directory. The directory is removed via t.Cleanup() on termination of the test. (On MacOS t.TempDir() returns a symlink.)
func WriteExecutable ¶
WriteToFile writes data to the file at path. The file is created with 0755 permissions. Directories that are in the path but do not exist are created. If an error happens, t.Fatal() is called.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.