ipn/ipnlocal: add LocalBackend.SetDirectFileRoot

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2021-04-12 14:05:44 -07:00
committed by Brad Fitzpatrick
parent 64c80129f1
commit f5742b0647
3 changed files with 88 additions and 17 deletions

View File

@ -94,6 +94,13 @@ type PartialFile struct {
Started time.Time // time transfer started
DeclaredSize int64 // or -1 if unknown
Received int64 // bytes copied thus far
// FinalPath is non-empty when the final has been completely
// written and renamed into place. This is then the complete
// path to the file post-rename. This is only set in
// "direct" file mode where the peerapi isn't being used; see
// LocalBackend.SetDirectFileRoot.
FinalPath string `json:",omitempty"`
}
// StateKey is an opaque identifier for a set of LocalBackend state