MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / CreateFileWithMode

Method CreateFileWithMode

agent/utils/files/file_op.go:138–144  ·  view source on GitHub ↗
(dst string, mode fs.FileMode)

Source from the content-addressed store, hash-verified

136}
137
138func (f FileOp) CreateFileWithMode(dst string, mode fs.FileMode) error {
139 file, err := f.Fs.OpenFile(dst, os.O_CREATE, mode)
140 if err != nil {
141 return err
142 }
143 return file.Close()
144}
145
146func (f FileOp) LinkFile(source string, dst string, isSymlink bool) error {
147 if isSymlink {

Callers 1

CreateMethod · 0.95

Calls 2

OpenFileMethod · 0.80
CloseMethod · 0.65

Tested by

no test coverage detected