MCPcopy Index your code
hub / github.com/celer-pkg/celer / Remove

Method Remove

pkgcache/cache_setup.go:99–124  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

97}
98
99func (n *NFSServerSetup) Remove() error {
100 n.nfsDir = filepath.Clean(n.nfsDir)
101
102 if fileio.PathExists(n.nfsDir) {
103 if err := n.removeAppendOnlyAttribute(); err != nil {
104 return err
105 }
106 }
107
108 if err := n.removeNFSExportEntry(); err != nil {
109 return err
110 }
111 if err := n.removeChattrCronJob(nfsUser); err != nil {
112 return err
113 }
114 if err := n.reloadNFSExports(); err != nil {
115 return err
116 }
117 if err := removeSystemGroupAndUser(nfsUser); err != nil {
118 return err
119 }
120
121 fmt.Println() // Just a blank line.
122 color.PrintSuccess("NFS cache server setup removed for %q", n.nfsDir)
123 return nil
124}
125
126type NFSClientSetup struct {
127 nfsClientDir string

Callers 9

doSetupMethod · 0.95
StoreMethod · 0.45
removeChattrCronJobMethod · 0.45
StoreMethod · 0.45
CopyFileFunction · 0.45
MoveFileFunction · 0.45
fileCopyFunction · 0.45
TestDownloadRetrySuccessFunction · 0.45

Calls 8

removeNFSExportEntryMethod · 0.95
removeChattrCronJobMethod · 0.95
reloadNFSExportsMethod · 0.95
PathExistsFunction · 0.92
PrintSuccessFunction · 0.92
removeSystemGroupAndUserFunction · 0.85
CleanMethod · 0.65

Tested by 2

TestDownloadRetrySuccessFunction · 0.36