# Path: pycdlib/pycdlibexception.py
# class PyCdlibException(Exception):
# class PyCdlibInternalError(PyCdlibException):
# class PyCdlibInvalidInput(PyCdlibException):
# class PyCdlibInvalidISO(PyCdlibException):
#     def __init__(self, msg):
#     def __init__(self, msg):
#     def __init__(self, msg):
#     def __init__(self, msg):
# 
# Path: pycdlib/utils.py
# def swab_32bit(x):
# def swab_16bit(x):
# def ceiling_div(numer, denom):
# def copy_data(data_length, blocksize, infp, outfp):
# def encode_space_pad(instr, length, encoding):
# def normpath(path):
# def gmtoffset_from_tm(tm, local):
# def zero_pad(fp, data_size, pad_size):
# def starts_with_slash(path):
# def split_path(iso_path):
# def file_object_supports_binary(fp):
# def truncate_basename(basename, iso_level, is_dir):
# def mangle_file_for_iso9660(orig, iso_level):
# def mangle_dir_for_iso9660(orig, iso_level):
#     def __init__(self, target):
#     def __enter__(self):
#     def __exit__(self, *_, **__):
#     def __len__(self):
#     def dispose(self):
#     def get_target(self):
#     def get_handle(self):
#     def get_geometry(self):
#     def tell(self):
#     def _tell(self):
#     def seek(self, offset, whence=os.SEEK_SET):
#     def read(self, size=-1):
#     def align(self, size, to=None):
# class Win32RawDevice:


import struct
from pycdlib import pycdlibexception
from pycdlib import utils
    from typing import Type  # NOQA pylint: disable=unused-import
        Update the parent directory number for this Path Table Record.

        Parameters:
         parent_dir_num - The new parent directory number to assign to this PTR.
        Returns:
         Nothing.
        """
        if not self._initialized:
            raise pycdlibexception.PyCdlibInternalError('Path Table Record not initialized')
        self.parent_directory_num = parent_dir_num

    def equal_to_be(self, be_record):
        # type: (PathTableRecord) -> bool
        """
        Compare a little-endian path table record to its big-endian counterpart.
        This is used to ensure that the ISO is sane.

        Parameters:
         be_record - The big-endian object to compare with the little-endian
                     object.
        Returns:
         True if this record is equal to the big-endian record passed in,
         False otherwise.
        """
        if not self._initialized:
            raise pycdlibexception.PyCdlibInternalError('Path Table Record not initialized')

        if be_record.len_di != self.len_di or \
           be_record.xattr_length != self.xattr_length or \
           utils.swab_32bit(be_record.extent_location) != self.extent_location or \

# Path: pycdlib/pycdlibexception.py
# class PyCdlibException(Exception):
# class PyCdlibInternalError(PyCdlibException):
# class PyCdlibInvalidInput(PyCdlibException):
# class PyCdlibInvalidISO(PyCdlibException):
#     def __init__(self, msg):
#     def __init__(self, msg):
#     def __init__(self, msg):
#     def __init__(self, msg):
# 
# Path: pycdlib/utils.py
# def swab_32bit(x):
# def swab_16bit(x):
# def ceiling_div(numer, denom):
# def copy_data(data_length, blocksize, infp, outfp):
# def encode_space_pad(instr, length, encoding):
# def normpath(path):
# def gmtoffset_from_tm(tm, local):
# def zero_pad(fp, data_size, pad_size):
# def starts_with_slash(path):
# def split_path(iso_path):
# def file_object_supports_binary(fp):
# def truncate_basename(basename, iso_level, is_dir):
# def mangle_file_for_iso9660(orig, iso_level):
# def mangle_dir_for_iso9660(orig, iso_level):
#     def __init__(self, target):
#     def __enter__(self):
#     def __exit__(self, *_, **__):
#     def __len__(self):
#     def dispose(self):
#     def get_target(self):
#     def get_handle(self):
#     def get_geometry(self):
#     def tell(self):
#     def _tell(self):
#     def seek(self, offset, whence=os.SEEK_SET):
#     def read(self, size=-1):
#     def align(self, size, to=None):
# class Win32RawDevice:


# Path: pycdlib/path_table_record.py
import struct
from pycdlib import pycdlibexception
from pycdlib import utils
    from typing import Type  # NOQA pylint: disable=unused-import

        Update the parent directory number for this Path Table Record.

        Parameters:
         parent_dir_num - The new parent directory number to assign to this PTR.
        Returns:
         Nothing.
        """
        if not self._initialized:
            raise pycdlibexception.PyCdlibInternalError('Path Table Record not initialized')
        self.parent_directory_num = parent_dir_num

    def equal_to_be(self, be_record):
        # type: (PathTableRecord) -> bool
        """
        Compare a little-endian path table record to its big-endian counterpart.
        This is used to ensure that the ISO is sane.

        Parameters:
         be_record - The big-endian object to compare with the little-endian
                     object.
        Returns:
         True if this record is equal to the big-endian record passed in,
         False otherwise.
        """
        if not self._initialized:
            raise pycdlibexception.PyCdlibInternalError('Path Table Record not initialized')

        if be_record.len_di != self.len_di or \
           be_record.xattr_length != self.xattr_length or \
           utils.swab_32bit(be_record.extent_location) != self.extent_location or \

           utils.swab_16bit(be_record.parent_directory_num) != self.parent_directory_num or \