To use MoXing to access a folder, you need to add the recursive=True parameter. The default value is False.
Obtain the size of an OBS folder.
mox.file.get_size('obs://bucket_name/sub_dir_0/sub_dir_1', recursive=True)
Obtain the size of an OBS file.
mox.file.get_size('obs://bucket_name/obs_file.txt')