MCPcopy Create free account
hub / github.com/dropbox/dbxcli / restoreMetadataFromDropbox

Function restoreMetadataFromDropbox

cmd/restore.go:101–115  ·  view source on GitHub ↗
(path string, metadata *files.FileMetadata)

Source from the content-addressed store, hash-verified

99}
100
101func restoreMetadataFromDropbox(path string, metadata *files.FileMetadata) (jsonMetadata, error) {
102 if metadata == nil {
103 return jsonMetadata{
104 Type: "file",
105 PathDisplay: path,
106 }, nil
107 }
108
109 result, err := jsonMetadataFromDropbox(metadata)
110 if err != nil {
111 return jsonMetadata{}, err
112 }
113 result.PathDisplay = metadataDisplayPath(path, result.PathDisplay)
114 return result, nil
115}
116
117func renderRestoreResult(w io.Writer, result restoreResult) error {
118 path := result.Result.PathDisplay

Callers 1

newRestoreResultFunction · 0.85

Calls 2

jsonMetadataFromDropboxFunction · 0.85
metadataDisplayPathFunction · 0.85

Tested by

no test coverage detected