Structure of the vfsMeta objects

Dear all,

In the vfsMeta, we have informations about all files of the cache (mirror of vfs).

File look like:

{
"ModTime": "2022-11-18T13:45:54.834414152Z",
"ATime": "2022-11-18T13:45:54.834715354Z",
"Size": xxx,
"Rs": [
{
"Pos": 0,
"Size": 2081902
}
],
"Fingerprint": "xxx",
"Dirty": false
}

-> Where is this structure documented?
-> How could I know if the file is in the upload queue or only in the read cache?

Thanks

It's all on github so feel free to browse away:

That's in the log file as it's queued to upload.

It isn't designed to be used externally out of rclone and may change at any time!

Here is its definition

The Ranges are defined here

I don't think there is an API for that. You can check how many files are in the queue using the API.

When is the dirty set to true? Isn't that when the file is modified locally? and set to false when the modification is uploaded?

That is correct.

For those coming here, here is a quick bash script that list uploading files:

grep --recursive --ignore-case --files-with-matches '"Dirty": true' /var/cache/rclone/vfsMeta

where /var/cache/rclone/vfsMeta is the cache set by cache-dir option

Hope to help anyone :slight_smile:

Rationale:
There is a json object under /vfsMeta that store the status of each file (under the CLOUD path).
When the file is modified locally (dirty), a " Dirty: true " is set on the file.
The script will iterate on all object, and look if it is dirty or not.
Caveat: not checked on huge cache :-/

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.