Beispiel #1
0
func (fs *lockingFileSystem) Create(name string, flags uint32, mode uint32, context *fuse.Context) (file nodefs.File, code fuse.Status) {
	defer fs.locked()()
	file, code = fs.FS.Create(name, flags, mode, context)

	file = nodefs.NewLockingFile(&fs.lock, file)
	return file, code
}
Beispiel #2
0
func (fs *lockingFileSystem) Open(name string, flags uint32, context *fuse.Context) (file nodefs.File, code fuse.Status) {
	file, code = fs.FS.Open(name, flags, context)
	file = nodefs.NewLockingFile(&fs.lock, file)
	return
}