Documentation ¶
Index ¶
- Constants
- func Abs(ctx context.Context, path string) (string, error)
- func Chdir(ctx context.Context, dir string) error
- func CopyFile(ctx context.Context, src, dst string) error
- func MkdirAll(ctx context.Context, path string) (err error)
- func ReadDir(ctx context.Context, path string) ([]fs.DirEntry, error)
- func ReadFile(ctx context.Context, path string) ([]byte, error)
- func RemoveAll(ctx context.Context, path string) (err error)
- func Rename(ctx context.Context, oldpath, newpath string) error
- func Stat(ctx context.Context, path string) (os.FileInfo, error)
- func TempDir(ctx context.Context, dir, pattern string) (string, error)
- func Which(ctx context.Context, exe string) (string, error)
- func WriteFile(ctx context.Context, path string, data []byte, perm os.FileMode) error
Constants ¶
View Source
const TempDirContextKey = tempDirContextKeyType("overwriteTempDir")
TempDirContextKey can be used to overwrite TempDir in tests.
Variables ¶
This section is empty.
Functions ¶
func TempDir ¶
TempDir is a wrapper for os.MkdirTemp. In swarming, this file might not be in /tmp, but in a subdirectory of the swarming task work directory.
Use the TempDirContextKey to overwrite os.MkdirTemp with another function with the same signature.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.