How to measure disc size of remote directories

Hi all,

there exists the function g_file_measure_disk_usage (see documentation) to calculate the disc usage of a given GFile object. Unfortunately it turns out that this function does not work on remote directories, mounted via GIO. For example, when I am connected to an FTP directory, I get the following terminal error output: g_file_measure_disk_usage failed: Operation not supported for the current backend.

What do I have to do to calculate the the remote size then? I would need it to show the user the time it would need to copy/move directories from a remote directory to the local directory. Is it only possible to implement a disc size calculation function from scratch? It would be great to have something provided by GIO.

Thank you

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