Lines Matching refs:dir
80 func writeReadOnlyFile(dir string, f bp2build.BazelFile) error {
81 dir = filepath.Join(dir, f.Dir)
82 if err := createDirectoryIfNonexistent(dir); err != nil {
85 pathToFile := filepath.Join(dir, f.Basename)
93 func writeReadWriteFile(dir string, f bp2build.BazelFile) error {
94 dir = filepath.Join(dir, f.Dir)
95 if err := createDirectoryIfNonexistent(dir); err != nil {
98 pathToFile := filepath.Join(dir, f.Basename)
106 func createDirectoryIfNonexistent(dir string) error {
107 if _, err := os.Stat(dir); os.IsNotExist(err) {
108 return os.MkdirAll(dir, os.ModePerm)