# Path: pycdlib/dates.py
# def string_to_timestruct(input_string):
#     def __init__(self):
#     def parse(self, datestr):
#     def new(self):
#     def record(self):
#     def __ne__(self, other):
#     def __init__(self):
#     def parse(self, datestr):
#     def record(self):
#     def new(self, tm=0.0):
#     def __ne__(self, other):
# class DirectoryRecordDate(object):
# class VolumeDescriptorDate(object):
#     FMT = '=BBBBBBb'
#     TIME_FMT = '%Y%m%d%H%M%S'
#     EMPTY_STRING = b'0' * 16 + b'\x00'
# 
# 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 bisect
import struct
from pycdlib import dates
from pycdlib import pycdlibexception
from pycdlib import utils
    from typing import Dict, List, Optional  # NOQA pylint: disable=unused-import
    from pycdlib import dr  # NOQA pylint: disable=unused-import
                                              rr_relocated_child, rr_relocated,
                                              rr_relocated_parent, bytes_to_skip,
                                              curr_dr_len, attributes)
            if new_dr_len < 0:
                raise pycdlibexception.PyCdlibInternalError('Could not assign Rock Ridge entries')

        if new_dr_len > ALLOWED_DR_SIZE:
            raise pycdlibexception.PyCdlibInternalError('Rock Ridge entry increased DR length too far')

        new_dr_len += (new_dr_len % 2)

        namelist = [nm.posix_name for nm in self.dr_entries.nm_records]
        namelist.extend([nm.posix_name for nm in self.ce_entries.nm_records])
        self._full_name = b''.join(namelist)

        self._initialized = True

        return new_dr_len

    def add_to_file_links(self):
        # type: () -> None
        """
        Increment the number of POSIX file links on this entry by one.

        Parameters:
         None.
        Returns:
         Nothing.
        """
        if not self._initialized:

# Path: pycdlib/dates.py
# def string_to_timestruct(input_string):
#     def __init__(self):
#     def parse(self, datestr):
#     def new(self):
#     def record(self):
#     def __ne__(self, other):
#     def __init__(self):
#     def parse(self, datestr):
#     def record(self):
#     def new(self, tm=0.0):
#     def __ne__(self, other):
# class DirectoryRecordDate(object):
# class VolumeDescriptorDate(object):
#     FMT = '=BBBBBBb'
#     TIME_FMT = '%Y%m%d%H%M%S'
#     EMPTY_STRING = b'0' * 16 + b'\x00'
# 
# 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/rockridge.py
import bisect
import struct
from pycdlib import dates
from pycdlib import pycdlibexception
from pycdlib import utils
    from typing import Dict, List, Optional  # NOQA pylint: disable=unused-import
    from pycdlib import dr  # NOQA pylint: disable=unused-import

                                              rr_relocated_child, rr_relocated,
                                              rr_relocated_parent, bytes_to_skip,
                                              curr_dr_len, attributes)
            if new_dr_len < 0:
                raise pycdlibexception.PyCdlibInternalError('Could not assign Rock Ridge entries')

        if new_dr_len > ALLOWED_DR_SIZE:
            raise pycdlibexception.PyCdlibInternalError('Rock Ridge entry increased DR length too far')

        new_dr_len += (new_dr_len % 2)

        namelist = [nm.posix_name for nm in self.dr_entries.nm_records]
        namelist.extend([nm.posix_name for nm in self.ce_entries.nm_records])
        self._full_name = b''.join(namelist)

        self._initialized = True

        return new_dr_len

    def add_to_file_links(self):
        # type: () -> None
        """
        Increment the number of POSIX file links on this entry by one.

        Parameters:
         None.
        Returns:
         Nothing.
        """
        if not self._initialized:

            raise pycdlibexception.PyCdlibInternalError('Rock Ridge extension not initialized')