Cette page n'est pas encore disponible dans votre langue. Nous nous efforçons d'ajouter d'autres langues. Nous vous remercions de votre compréhension.

On this page
Help Center/ ModelArts/ Troubleshooting/ MoXing/ Failed to Access a Folder Using MoXing and Read the Folder Size Using get_size

Failed to Access a Folder Using MoXing and Read the Folder Size Using get_size

Updated on 2024-06-11 GMT+08:00

Symptom

  • The folder cannot be accessed using MoXing.
  • The folder size read by using get_size of MoXing is 0.

Possible Cause

To use MoXing to access a folder, you need to add the recursive=True parameter. The default value is False.

Solution

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')
Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback