MCPcopy
hub / github.com/dropbox/godropbox / New

Function New

sys/filelock/filelock.go:33–39  ·  view source on GitHub ↗

Creates new FileLock object given a unique name.

(name string)

Source from the content-addressed store, hash-verified

31
32// Creates new FileLock object given a unique name.
33func New(name string) *FileLock {
34 return &FileLock{
35 name: name,
36 path: "/tmp",
37 prefix: "flock-",
38 }
39}
40
41func (f *FileLock) performLock(flockHow int) (performErr error) {
42 if f.fileH != nil {

Callers 4

TestSimpleMethod · 0.70
TestSharedSimpleMethod · 0.70
TestReuseSimpleMethod · 0.70
performTransitionFunction · 0.70

Calls

no outgoing calls

Tested by 4

TestSimpleMethod · 0.56
TestSharedSimpleMethod · 0.56
TestReuseSimpleMethod · 0.56
performTransitionFunction · 0.56