MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / remove_folder

Method remove_folder

tools/python-3.11.9-amd64/Lib/mailbox.py:1135–1145  ·  view source on GitHub ↗

Delete the named folder, which must be empty.

(self, folder)

Source from the content-addressed store, hash-verified

1133 factory=self._factory)
1134
1135 def remove_folder(self, folder):
1136 """Delete the named folder, which must be empty."""
1137 path = os.path.join(self._path, folder)
1138 entries = os.listdir(path)
1139 if entries == ['.mh_sequences']:
1140 os.remove(os.path.join(path, '.mh_sequences'))
1141 elif entries == []:
1142 pass
1143 else:
1144 raise NotEmptyError('Folder not empty: %s' % self._path)
1145 os.rmdir(path)
1146
1147 def get_sequences(self):
1148 """Return a name-to-key-list dictionary to define each sequence."""

Callers

nothing calls this directly

Calls 5

NotEmptyErrorClass · 0.85
listdirMethod · 0.80
rmdirMethod · 0.80
joinMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected