package
1.2.120
Repository: https://github.com/searking/golang.git
Documentation: pkg.go.dev

# Functions

Create is like os.Create, but returns a write-locked file.
Edit creates the named file with mode 0666 (before umask), but does not truncate existing contents.
IsNotSupported returns a boolean indicating whether the error is known to report that a function is not supported (possibly for a specific input).
Lock places an advisory write lock on the file, blocking until it can be locked.
MutexAt returns a new Mutex with Path set to the given non-empty path.
NewLockedFile returns a locked file.
Open is like os.Open, but returns a read-locked file.
OpenFile is like os.OpenFile, but returns a locked file.
Read opens the named file with a read-lock and returns its contents.
RLock places an advisory read lock on the file, blocking until it can be locked.
Transform invokes t with the result of reading the named file, with its lock still held.
TryLock tries to lock rw for writing and reports whether it succeeded.
TryRLock tries to lock rw for reading and reports whether it succeeded.
Unlock removes an advisory lock placed on f by this process.
Write opens the named file (creating it with the given permissions if needed), then write-locks it and overwrites it with the given content.

# Structs

No description provided by the author
A Mutex provides mutual exclusion within and across processes by locking a well-known file.

# Interfaces

A File provides the minimal set of methods required to lock an open file.