Lines Matching refs:Dir
22 // RunCmd runs "bin args..." in dir with timeout and returns its output.
23 func RunCmd(timeout time.Duration, dir, bin string, args ...string) ([]byte, error) {
25 cmd.Dir = dir
118 // FilesExist returns true if all files exist in dir.
120 func FilesExist(dir string, files map[string]bool) bool {
125 if !IsExist(filepath.Join(dir, filepath.FromSlash(f))) {
136 // Linux does not support atomic dir replace, so we copy to tmp dir first.
137 // Then remove dst dir and rename tmp to dst (as atomic as can get on Linux).
151 if err := MkdirAll(filepath.Dir(dst)); err != nil {
180 if err := MkdirAll(filepath.Dir(dst)); err != nil {
190 func MkdirAll(dir string) error {
191 return os.MkdirAll(dir, DefaultDirPerm)
217 func ListDir(dir string) ([]string, error) {
218 f, err := os.Open(dir)