fs_extra
fs_extra copied to clipboard
What is the return type of fs_extra::dir::copy?
trafficstars
It is Result<u32>, not Result<()>, but the documentation does not tell what that number (u32) means.
@KSXGitHub total number of bytes copied
@webdesus I guessed so from reading the source code.
I do think that in addition to adding a documentation, you should change return type of this function to a named struct with descriptive fields, so that IDE user may not need to actually open documentation to understand what it means, for example:
pub struct CopyReturn {
pub bytes_copied: usize,
pub files_copied: usize,
}