in azure/datalake/store/core.py [0:0]
def rmdir(self, path):
"""
Remove empty directory
Parameters
----------
path: str or AzureDLPath
Directory path to remove
Returns
-------
None
"""
if self.info(path)['type'] != "DIRECTORY":
raise ValueError('Can only rmdir on directories')
# should always invalidate the cache when checking to see if the directory is empty
if self.ls(path, invalidate_cache=True):
raise ValueError('Directory not empty: %s' % path)
self.rm(path, False)