Skip to main content
Ctrl+K

barecat

  • Getting Started
  • Working with Image Datasets
  • How to Automatically Encode and Decode Files
  • How to Convert Archives
  • How to Merge Archives
    • How to Use with PyTorch DataLoader
    • How to Mount with FUSE
    • How to Set Up Shell Completions
    • How to Verify and Repair Archives
    • Command Line Interface
    • Python API Reference
    • File Format Specification
    • Architecture
    • Integrity Checking
    • Comparison with Other Formats
    • Performance Characteristics
  • GitHub
  • Getting Started
  • Working with Image Datasets
  • How to Automatically Encode and Decode Files
  • How to Convert Archives
  • How to Merge Archives
  • How to Use with PyTorch DataLoader
  • How to Mount with FUSE
  • How to Set Up Shell Completions
  • How to Verify and Repair Archives
  • Command Line Interface
  • Python API Reference
  • File Format Specification
  • Architecture
  • Integrity Checking
  • Comparison with Other Formats
  • Performance Characteristics
  • GitHub

Section Navigation

  • barecat.__main__
  • barecat.exceptions
    • BarecatError
    • FileExistsBarecatError
    • FileNotFoundBarecatError
    • DirectoryNotEmptyBarecatError
    • IsADirectoryBarecatError
    • NotADirectoryBarecatError
    • BarecatIntegrityError
    • NotEnoughSpaceBarecatError
    • FileTooLargeBarecatError
  • barecat.io
    • barecat.io.copyfile
      • _FdType
      • _CopyContext
      • copy
      • copy_crc32c
      • accumulate_crc32c
      • write_zeroes
      • _get_fd_type
      • _is_seekable
      • _copy_buffered
      • _copy_buffered_eof
      • _copy_same_file_overlap
      • _copy_file_range_loop
      • _copy_sendfile
      • _copy_splice
      • _sync_position
    • barecat.io.fileobj
      • BarecatFileObjectHelper
        • open
      • BarecatFileObject
      • BarecatReadOnlyFileObject
        • read
        • readinto
        • readall
        • readable
        • seekable
        • sendfile
        • writable
        • truncate
        • readline
        • tell
        • seek
        • close
        • size
      • BarecatReadWriteFileObject
        • tell
        • seek
        • truncate
        • readable
        • writable
        • seekable
        • flush
        • close
      • accumulate_crc32c
      • write_zeroes
    • barecat.io.open
      • open
      • reopen
    • copy
    • copy_crc32c
    • accumulate_crc32c
    • write_zeroes
  • Barecat
    • __getitem__
    • get
    • items
    • keys
    • values
    • __contains__
    • __len__
    • __iter__
    • __setitem__
    • setdefault
    • __delitem__
    • open
    • exists
    • isfile
    • isdir
    • listdir
    • walk
    • scandir
    • glob
    • globfiles
    • iglob
    • iglobfiles
    • files
    • dirs
    • num_files
    • num_dirs
    • total_size
    • readinto
    • read
    • add_by_path
    • add
    • update_file
    • mkdir
    • remove
    • rmdir
    • rmtree
    • rename
    • total_physical_size_seek
    • total_physical_size_stat
    • total_logical_size
    • merge_from_other_barecat
    • shard_size_limit
    • logical_shard_end
    • physical_shard_end
    • index
    • check_crc32c
    • verify_integrity
    • register_codec
    • defrag
    • close
    • __exit__
  • Index
    • lookup_file
    • lookup_files
    • lookup_dir
    • lookup
    • __len__
    • num_files
    • num_dirs
    • total_size
    • __iter__
    • __contains__
    • isfile
    • isdir
    • exists
    • iter_all_fileinfos
    • list_direct_fileinfos
    • list_subdir_dirinfos
    • iter_direct_fileinfos
    • iter_subdir_dirinfos
    • listdir_names
    • listdir_infos
    • iterdir_names
    • iterdir_infos
    • glob_paths
    • iterglob_paths
    • iterglob_infos
    • iterglob_infos_incl_excl
    • walk_infos
    • walk_names
    • get_last_file
    • logical_shard_end
    • shard_size_limit
    • num_used_shards
    • add
    • add_file
    • add_files
    • update_file
    • add_dir
    • rename
    • rename_file
    • rename_dir
    • remove_file
    • remove_files
    • remove_empty_dir
    • remove_recursively
    • chmod
    • chown
    • update_mtime
    • verify_integrity
    • merge_from_other_barecat
    • check_merge_conflicts
    • update_treestats
    • update_dirs
    • no_triggers
    • bulk_mode
    • attached_database
    • close
    • optimize
    • __exit__
  • Sharder
    • __exit__
  • BarecatDirInfo
    • num_subdirs
    • num_files
    • size_tree
    • num_files_tree
    • asdict
    • num_entries
    • fill_from_statresult
    • isdir
  • BarecatEntryInfo
    • mode
    • uid
    • gid
    • mtime_ns
    • path
    • mtime_dt
    • isfile
    • isdir
    • update_mtime
    • fill_from_statresult
    • row_factory
  • BarecatFileInfo
    • shard
    • offset
    • size
    • crc32c
    • asdict
    • fill_from_statresult
    • end
    • isfile
  • Order
    • ANY
    • RANDOM
    • ADDRESS
    • PATH
    • DESC
    • as_query_text
  • BarecatFileObject
  • BarecatReadOnlyFileObject
    • read
    • readinto
    • readall
    • readable
    • seekable
    • sendfile
    • writable
    • truncate
    • readline
    • tell
    • seek
    • close
    • size
  • BarecatReadWriteFileObject
    • tell
    • seek
    • truncate
    • readable
    • writable
    • seekable
    • flush
    • close
  • DecodedView
    • register_codec
    • clear_codecs
    • keys
    • items
    • values
  • get_completion_script
  • get_cached_reader
  • open
  • rmdir

rmdir#

barecat.Barecat.rmdir(item)[source]#

Remove (delete) an empty directory from the archive.

Parameters:

item (Union[BarecatDirInfo, str]) – Either a BarecatDirInfo object, or a path to a directory within the archive.

Raises:
  • FileNotFoundBarecatError – If a directory with this path does not exist in the archive.

  • DirectoryNotEmptyBarecatError – If the directory is not empty.

© Copyright 2026, István Sárándi.

Created using Sphinx 8.1.3.

Built with the PyData Sphinx Theme 0.16.1.