(
        self,
        path: PATH_TYPES,
        recurse: bool = False,
        force: bool = False,
        ignore_errors: bool = False,
        dry_run: bool = False,
    )
return 0
Remove the directory. If recurse is True, allow removing empty children.

        If force is true, remove contents destructively.
Remove the directory. If recurse is True, allow removing empty children.
Remove the directory . If recurse is True allow removing empty children .
def rmdir(
        self,
        path: PATH_TYPES,
        recurse: bool = False,
        force: bool = False,
        ignore_errors: bool = False,
        dry_run: bool = False,
    ) -> int:
        """
        Remove the directory. If recurse is True, allow removing empty children.

        If force is true, remove contents destructively.
        """
        if not force:
            if not isinstance(path, self.PATH_BACKEND):
                path = self.PATH_BACKEND(path)
            contents = list(path.iterdir(include_swiftkeep=True, recurse=True))
            if contents and all(p.name == ".swiftkeep" for p in contents):
                for p in contents:
                    if p.name == ".swiftkeep":
                        p.unlink()
            raise OSError(
                "Object container directories are auto-destroyed when they are emptied"
            )
        target_path = str(path)
        if target_path == ".":
            target_path = ""
        log_prefix = "[DRY RUN] " if dry_run else ""
        with self.connection() as conn:
            for item in self.walk(root=target_path):
                logger.info(f"{log_prefix}Deleting item from object storage: {item}")
                if not dry_run:
                    conn.delete_object(self.default_container, str(item))
        return 0
def rmdir ( self , path : PATH_TYPES , recurse : bool = False , force : bool = False , ignore_errors : bool = False , dry_run : bool = False , ) -> int : if not force : if not isinstance ( path , self . PATH_BACKEND ) : path = self . PATH_BACKEND ( path ) contents = list ( path . iterdir ( include_swiftkeep = True , recurse = True ) ) if contents and all ( p . name == ".swiftkeep" for p in contents ) : for p in contents : if p . name == ".swiftkeep" : p . unlink ( ) raise OSError ( "Object container directories are auto-destroyed when they are emptied" ) target_path = str ( path ) if target_path == "." : target_path = "" log_prefix = "[DRY RUN] " if dry_run else "" with self . connection ( ) as conn : for item in self . walk ( root = target_path ) : logger . info ( f"{log_prefix}Deleting item from object storage: {item}" ) if not dry_run : conn . delete_object ( self . default_container , str ( item ) ) return 0