MCPcopy Create free account
hub / github.com/OpenListTeam/OpenList / MakeDir

Method MakeDir

drivers/smb/driver.go:98–110  ·  view source on GitHub ↗
(ctx context.Context, parentDir model.Obj, dirName string)

Source from the content-addressed store, hash-verified

96}
97
98func (d *SMB) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) error {
99 if err := d.checkConn(ctx); err != nil {
100 return err
101 }
102 fullPath := filepath.Join(parentDir.GetPath(), dirName)
103 err := d.fs.MkdirAll(fullPath, 0700)
104 if err != nil {
105 d.cleanLastConnTime()
106 return err
107 }
108 d.updateLastConnTime()
109 return nil
110}
111
112func (d *SMB) Move(ctx context.Context, srcObj, dstDir model.Obj) error {
113 if err := d.checkConn(ctx); err != nil {

Callers

nothing calls this directly

Calls 5

checkConnMethod · 0.95
cleanLastConnTimeMethod · 0.95
updateLastConnTimeMethod · 0.95
GetPathMethod · 0.65
MkdirAllMethod · 0.45

Tested by

no test coverage detected