Adds description to lock.AppendToFile

pull/15782/head
x7upLime 2023-02-08 17:19:44 +02:00
parent 07d20708a5
commit e34548f9ae
1 changed files with 2 additions and 1 deletions

View File

@ -43,7 +43,8 @@ func WriteFile(filename string, data []byte, perm os.FileMode) error {
return os.WriteFile(filename, data, perm)
}
// AppendToFile
// AppendToFile appends DATA bytes to the specified FILENAME in a mutually exclusive way.
// The file is created if it does not exist, using the specified PERM (before umask)
func AppendToFile(filename string, data []byte, perm os.FileMode) error {
spec := PathMutexSpec(filename)
klog.Infof("WriteFile acquiring %s: %+v", filename, spec)