From e11711f530eab57ecf9968e0b32068a33da57ce4 Mon Sep 17 00:00:00 2001 From: Marius Kleidl Date: Tue, 23 Apr 2024 11:21:20 +0200 Subject: [PATCH] filestore: Update documentation regarding locks Reported in https://github.com/tus/tusd/issues/1110 --- pkg/filestore/filestore.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/filestore/filestore.go b/pkg/filestore/filestore.go index a6d54809e..33efaf319 100644 --- a/pkg/filestore/filestore.go +++ b/pkg/filestore/filestore.go @@ -6,6 +6,10 @@ // `[id]` files without an extension contain the raw binary data uploaded. // No cleanup is performed so you may want to run a cronjob to ensure your disk // is not filled up with old and finished uploads. +// +// Related to the filestore is the package filelocker, which provides a file-based +// locking mechanism. The use of some locking method is recommended and further +// explained in https://tus.github.io/tusd/advanced-topics/locks/. package filestore import ( @@ -34,7 +38,6 @@ type FileStore struct { // New creates a new file based storage backend. The directory specified will // be used as the only storage entry. This method does not check // whether the path exists, use os.MkdirAll to ensure. -// In addition, a locking mechanism is provided. func New(path string) FileStore { return FileStore{path} }