CreateFile ...
(filePath string, forceCreate bool)
| 122 | |
| 123 | // CreateFile ... |
| 124 | func (l *LocalFileSystem) CreateFile(filePath string, forceCreate bool) error { |
| 125 | _, err := os.Stat(filePath) |
| 126 | if !forceCreate && os.IsExist(err) { |
| 127 | return fmt.Errorf("error in stating file %s because of %v", filePath, err) |
| 128 | } |
| 129 | _, err = os.Create(filePath) |
| 130 | return err |
| 131 | } |
| 132 | |
| 133 | // WriteFile ... |
| 134 | func (l *LocalFileSystem) WriteFile(filePath string, permission os.FileMode, contents []byte) error { |
nothing calls this directly
no outgoing calls
no test coverage detected