Code
stringlengths
103
85.9k
Summary
listlengths
0
94
Please provide a description of the function:def set_ptr(self, ptr): # type: (path_table_record.PathTableRecord) -> None ''' A method to set the Path Table Record associated with this Directory Record. Parameters: ptr - The path table record to associate with this Direc...
[]
Please provide a description of the function:def set_data_location(self, current_extent, tag_location): # pylint: disable=unused-argument # type: (int, int) -> None ''' A method to set the new extent location that the data for this Directory Record should live at. Parameters: ...
[]
Please provide a description of the function:def get_data_length(self): # type: () -> int ''' A method to get the length of the data that this Directory Record points to. Parameters: None. Returns: The length of the data that this Directory Record point...
[]
Please provide a description of the function:def set_data_length(self, length): # type: (int) -> None ''' A method to set the length of the data that this Directory Record points to. Parameters: length - The new length for the data. Returns: The length ...
[]
Please provide a description of the function:def new(self, length, fp, manage_fp, offset): # type: (int, BinaryIO, bool, int) -> None ''' Initialize a new Inode. Parameters: None. Returns: Nothing. ''' if self._initialized: raise pyc...
[]
Please provide a description of the function:def parse(self, extent, length, fp, log_block_size): # type: (int, int, BinaryIO, int) -> None ''' Parse an existing Inode. This just saves off the extent for later use. Parameters: extent - The original extent that the data lives a...
[]
Please provide a description of the function:def add_boot_info_table(self, boot_info_table): # type: (eltorito.EltoritoBootInfoTable) -> None ''' A method to add a boot info table to this Inode. Parameters: boot_info_table - The Boot Info Table object to add to this Inode. ...
[]
Please provide a description of the function:def update_fp(self, fp, length): # type: (BinaryIO, int) -> None ''' Update the Inode to use a different file object and length. Parameters: fp - A file object that contains the data for this Inode. length - The length of th...
[]
Please provide a description of the function:def string_to_timestruct(input_string): # type: (bytes) -> time.struct_time ''' A cacheable function to take an input string and decode it into a time.struct_time from the time module. If the string cannot be decoded because of an illegal value, then the...
[]
Please provide a description of the function:def parse(self, datestr): # type: (bytes) -> None ''' Parse a Directory Record date out of a string. Parameters: datestr - The string to parse the date out of. Returns: Nothing. ''' if self._initializ...
[]
Please provide a description of the function:def new(self): # type: () -> None ''' Create a new Directory Record date based on the current time. Parameters: tm - An optional argument that must be None Returns: Nothing. ''' if self._initialized: ...
[]
Please provide a description of the function:def record(self): # type: () -> bytes ''' Return a string representation of the Directory Record date. Parameters: None. Returns: A string representing this Directory Record Date. ''' if not self._ini...
[]
Please provide a description of the function:def parse(self, datestr): # type: (bytes) -> None ''' Parse a Volume Descriptor Date out of a string. A string of all zeros is valid, which means that the date in this field was not specified. Parameters: datestr - string t...
[]
Please provide a description of the function:def new(self, tm=0.0): # type: (float) -> None ''' Create a new Volume Descriptor Date. If tm is None, then this Volume Descriptor Date will be full of zeros (meaning not specified). If tm is not None, it is expected to be a struct_t...
[]
Please provide a description of the function:def parse(self, rrstr): # type: (bytes) -> None ''' Parse a Rock Ridge Sharing Protocol record out of a string. Parameters: rrstr - The string to parse the record out of. Returns: Nothing. ''' if self...
[]
Please provide a description of the function:def new(self, bytes_to_skip): # type: (int) -> None ''' Create a new Rock Ridge Sharing Protocol record. Parameters: bytes_to_skip - The number of bytes to skip. Returns: Nothing. ''' if self._initiali...
[]
Please provide a description of the function:def record(self): # type: () -> bytes ''' Generate a string representing the Rock Ridge Sharing Protocol record. Parameters: None. Returns: String containing the Rock Ridge record. ''' if not self._in...
[]
Please provide a description of the function:def new(self): # type: () -> None ''' Create a new Rock Ridge Rock Ridge record. Parameters: None. Returns: Nothing. ''' if self._initialized: raise pycdlibexception.PyCdlibInternalError('...
[]
Please provide a description of the function:def append_field(self, fieldname): # type: (str) -> None ''' Mark a field as present in the Rock Ridge records. Parameters: fieldname - The name of the field to mark as present; should be one of 'PX', 'PN', 'SL',...
[]
Please provide a description of the function:def record(self): # type: () -> bytes ''' Generate a string representing the Rock Ridge Rock Ridge record. Parameters: None. Returns: String containing the Rock Ridge record. ''' if not self._initiali...
[]
Please provide a description of the function:def parse(self, rrstr): # type: (bytes) -> None ''' Parse a Rock Ridge Continuation Entry record out of a string. Parameters: rrstr - The string to parse the record out of. Returns: Nothing. ''' if se...
[]
Please provide a description of the function:def new(self): # type: () -> None ''' Create a new Rock Ridge Continuation Entry record. Parameters: None. Returns: Nothing. ''' if self._initialized: raise pycdlibexception.PyCdlibInterna...
[]
Please provide a description of the function:def update_extent(self, extent): # type: (int) -> None ''' Update the extent for this CE record. Parameters: extent - The new extent for this CE record. Returns: Nothing. ''' if not self._initialized:...
[]
Please provide a description of the function:def update_offset(self, offset): # type: (int) -> None ''' Update the offset for this CE record. Parameters: extent - The new offset for this CE record. Returns: Nothing. ''' if not self._initialized:...
[]
Please provide a description of the function:def add_record(self, length): # type: (int) -> None ''' Add some more length to this CE record. Used when a new record is going to get recorded into the CE (rather than the DR). Parameters: length - The length to add to this...
[]
Please provide a description of the function:def record(self): # type: () -> bytes ''' Generate a string representing the Rock Ridge Continuation Entry record. Parameters: None. Returns: String containing the Rock Ridge record. ''' if not self._...
[]
Please provide a description of the function:def parse(self, rrstr): # type: (bytes) -> int ''' Parse a Rock Ridge POSIX File Attributes record out of a string. Parameters: rrstr - The string to parse the record out of. Returns: A string representing the RR ver...
[]
Please provide a description of the function:def new(self, mode): # type: (int) -> None ''' Create a new Rock Ridge POSIX File Attributes record. Parameters: mode - The Unix file mode for this record. Returns: Nothing. ''' if self._initialized: ...
[]
Please provide a description of the function:def record(self, rr_version): # type: (str) -> bytes ''' Generate a string representing the Rock Ridge POSIX File Attributes record. Parameters: rr_version - The Rock Ridge version to use. Returns: String con...
[]
Please provide a description of the function:def parse(self, rrstr): # type: (bytes) -> None ''' Parse a Rock Ridge Extensions Reference record out of a string. Parameters: rrstr - The string to parse the record out of. Returns: Nothing. ''' if ...
[]
Please provide a description of the function:def new(self, ext_id, ext_des, ext_src): # type: (bytes, bytes, bytes) -> None ''' Create a new Rock Ridge Extensions Reference record. Parameters: ext_id - The extension identifier to use. ext_des - The extension descriptor...
[]
Please provide a description of the function:def record(self): # type: () -> bytes ''' Generate a string representing the Rock Ridge Extensions Reference record. Parameters: None. Returns: String containing the Rock Ridge record. ''' if ...
[]
Please provide a description of the function:def length(ext_id, ext_des, ext_src): # type: (bytes, bytes, bytes) -> int ''' Static method to return the length of the Rock Ridge Extensions Reference record. Parameters: ext_id - The extension identifier to use. e...
[]
Please provide a description of the function:def new(self, extension_sequence): # type: (int) -> None ''' Create a new Rock Ridge Extension Selector record. Parameters: extension_sequence - The sequence number of this extension. Returns: Nothing. ''' ...
[]
Please provide a description of the function:def record(self): # type: () -> bytes ''' Generate a string representing the Rock Ridge Extension Selector record. Parameters: None. Returns: String containing the Rock Ridge record. ''' if not self._...
[]
Please provide a description of the function:def parse(self, rrstr): # type: (bytes) -> None ''' Parse a Rock Ridge POSIX Device Number record out of a string. Parameters: rrstr - The string to parse the record out of. Returns: Nothing. ''' if s...
[]
Please provide a description of the function:def new(self, dev_t_high, dev_t_low): # type: (int, int) -> None ''' Create a new Rock Ridge POSIX device number record. Parameters: dev_t_high - The high-order 32-bits of the device number. dev_t_low - The low-order 32-bits...
[]
Please provide a description of the function:def record(self): # type: () -> bytes ''' Generate a string representing the Rock Ridge POSIX Device Number record. Parameters: None. Returns: String containing the Rock Ridge record. ''' if n...
[]
Please provide a description of the function:def parse(self, rrstr): # type: (bytes) -> None ''' Parse a Rock Ridge Symbolic Link record out of a string. Parameters: rrstr - The string to parse the record out of. Returns: Nothing. ''' if self._i...
[]
Please provide a description of the function:def add_component(self, symlink_comp): # type: (bytes) -> None ''' Add a new component to this symlink record. Parameters: symlink_comp - The string to add to this symlink record. Returns: Nothing. ''' ...
[]
Please provide a description of the function:def current_length(self): # type: () -> int ''' Calculate the current length of this symlink record. Parameters: None. Returns: Length of this symlink record. ''' if not self._initialized: ...
[]
Please provide a description of the function:def record(self): # type: () -> bytes ''' Generate a string representing the Rock Ridge Symbolic Link record. Parameters: None. Returns: String containing the Rock Ridge record. ''' if not self._initi...
[]
Please provide a description of the function:def name(self): # type: () -> bytes ''' Generate a string that contains all components of the symlink. Parameters: None Returns: String containing all components of the symlink. ''' if not self._initi...
[]
Please provide a description of the function:def set_last_component_continued(self): # type: () -> None ''' Set the previous component of this SL record to continued. Parameters: None. Returns: Nothing. ''' if not self._initialized: ...
[]
Please provide a description of the function:def last_component_continued(self): # type: () -> bool ''' Determines whether the previous component of this SL record is a continued one or not. Parameters: None. Returns: True if the previous component of t...
[]
Please provide a description of the function:def length(symlink_components): # type: (List[bytes]) -> int ''' Static method to return the length of the Rock Ridge Symbolic Link record. Parameters: symlink_components - A list containing a string for each of the ...
[]
Please provide a description of the function:def parse(self, rrstr): # type: (bytes) -> None ''' Parse a Rock Ridge Alternate Name record out of a string. Parameters: rrstr - The string to parse the record out of. Returns: Nothing. ''' if self._...
[]
Please provide a description of the function:def new(self, rr_name): # type: (bytes) -> None ''' Create a new Rock Ridge Alternate Name record. Parameters: rr_name - The name for the new record. Returns: Nothing. ''' if self._initialized: ...
[]
Please provide a description of the function:def record(self): # type: () -> bytes ''' Generate a string representing the Rock Ridge Alternate Name record. Parameters: None. Returns: String containing the Rock Ridge record. ''' if not self._init...
[]
Please provide a description of the function:def parse(self, rrstr): # type: (bytes) -> None ''' Parse a Rock Ridge Child Link record out of a string. Parameters: rrstr - The string to parse the record out of. Returns: Nothing. ''' if self._init...
[]
Please provide a description of the function:def new(self): # type: () -> None ''' Create a new Rock Ridge Child Link record. Parameters: None. Returns: Nothing. ''' if self._initialized: raise pycdlibexception.PyCdlibInternalError('...
[]
Please provide a description of the function:def record(self): # type: () -> bytes ''' Generate a string representing the Rock Ridge Child Link record. Parameters: None. Returns: String containing the Rock Ridge record. ''' if not self._initiali...
[]
Please provide a description of the function:def set_log_block_num(self, bl): # type: (int) -> None ''' Set the logical block number for the child. Parameters: bl - Logical block number of the child. Returns: Nothing. ''' if not self._initialize...
[]
Please provide a description of the function:def parse(self, rrstr): # type: (bytes) -> None ''' Parse a Rock Ridge Parent Link record out of a string. Parameters: rrstr - The string to parse the record out of. Returns: Nothing. ''' if self._ini...
[]
Please provide a description of the function:def new(self): # type: () -> None ''' Generate a string representing the Rock Ridge Parent Link record. Parameters: None. Returns: String containing the Rock Ridge record. ''' if self._initialized: ...
[]
Please provide a description of the function:def record(self): # type: () -> bytes ''' Generate a string representing the Rock Ridge Child Link record. Parameters: None. Returns: String containing the Rock Ridge record. ''' if not self._initiali...
[]
Please provide a description of the function:def set_log_block_num(self, bl): # type: (int) -> None ''' Set the logical block number for the parent. Parameters: bl - Logical block number of the parent. Returns: Nothing. ''' if not self._initiali...
[]
Please provide a description of the function:def parse(self, rrstr): # type: (bytes) -> None ''' Parse a Rock Ridge Time Stamp record out of a string. Parameters: rrstr - The string to parse the record out of. Returns: Nothing. ''' if self._init...
[]
Please provide a description of the function:def new(self, time_flags): # type: (int) -> None ''' Create a new Rock Ridge Time Stamp record. Parameters: time_flags - The flags to use for this time stamp record. Returns: Nothing. ''' if self._ini...
[]
Please provide a description of the function:def record(self): # type: () -> bytes ''' Generate a string representing the Rock Ridge Time Stamp record. Parameters: None. Returns: String containing the Rock Ridge record. ''' if not self._initiali...
[]
Please provide a description of the function:def length(time_flags): # type: (int) -> int ''' Static method to return the length of the Rock Ridge Time Stamp record. Parameters: time_flags - Integer representing the flags to use. Returns: The length of ...
[]
Please provide a description of the function:def parse(self, rrstr): # type: (bytes) -> None ''' Parse a Rock Ridge Sparse File record out of a string. Parameters: rrstr - The string to parse the record out of. Returns: Nothing. ''' if self._ini...
[]
Please provide a description of the function:def new(self, file_size_high, file_size_low, table_depth): # type: (Optional[int], int, Optional[int]) -> None ''' Create a new Rock Ridge Sparse File record. Parameters: file_size_high - The high-order 32-bits of the file size. ...
[]
Please provide a description of the function:def record(self): # type: () -> bytes ''' Generate a string representing the Rock Ridge Sparse File record. Parameters: None. Returns: String containing the Rock Ridge record. ''' if not self._initial...
[]
Please provide a description of the function:def record(self): # type: () -> bytes ''' Generate a string representing the Rock Ridge Relocated Directory record. Parameters: None. Returns: String containing the Rock Ridge record. ''' if n...
[]
Please provide a description of the function:def parse(self, rrstr): # type: (bytes) -> None ''' Parse a Rock Ridge System Terminator record out of a string. Parameters: rrstr - The string to parse the record out of. Returns: Nothing. ''' if sel...
[]
Please provide a description of the function:def record(self): # type: () -> bytes ''' Generate a string representing the Rock Ridge System Terminator record. Parameters: None. Returns: String containing the Rock Ridge record. ''' if not...
[]
Please provide a description of the function:def parse(self, rrstr): # type: (bytes) -> None ''' Parse a Rock Ridge Platform Dependent record out of a string. Parameters: rrstr - The string to parse the record out of. Returns: Nothing. ''' if se...
[]
Please provide a description of the function:def new(self): # type: () -> None ''' Create a new Rock Ridge Platform Dependent record. Parameters: None. Returns: Nothing. ''' if self._initialized: raise pycdlibexception.PyCdlibInterna...
[]
Please provide a description of the function:def record(self): # type: () -> bytes ''' Generate a string representing the Rock Ridge Platform Dependent record. Parameters: None. Returns: String containing the Rock Ridge record. ''' if no...
[]
Please provide a description of the function:def has_entry(self, name): # type: (str) -> bool ''' An internal method to tell if we have already parsed an entry of the named type. Parameters: name - The name of the entry to check. Returns: True if we hav...
[]
Please provide a description of the function:def parse(self, record, is_first_dir_record_of_root, bytes_to_skip, continuation): # type: (bytes, bool, int, bool) -> None ''' Method to parse a rock ridge record. Parameters: record - The record to parse. is_first_dir_reco...
[]
Please provide a description of the function:def _record(self, entries): # type: (RockRidgeEntries) -> bytes ''' Return a string representing the Rock Ridge entry. Parameters: entries - The dr_entries or ce_entries to generate a record for. Returns: A string re...
[]
Please provide a description of the function:def record_dr_entries(self): # type: () -> bytes ''' Return a string representing the Rock Ridge entries in the Directory Record. Parameters: None. Returns: A string representing the Rock Ridge entry. ''' ...
[]
Please provide a description of the function:def record_ce_entries(self): # type: () -> bytes ''' Return a string representing the Rock Ridge entries in the Continuation Entry. Parameters: None. Returns: A string representing the Rock Ridge entry. ''' ...
[]
Please provide a description of the function:def _add_ce_record(self, curr_dr_len, thislen): # type: (int, int) -> int ''' An internal method to add a new length to a Continuation Entry. If the Continuation Entry does not yet exist, this method creates it. Parameters: ...
[]
Please provide a description of the function:def _new_symlink(self, symlink_path, curr_dr_len): # type: (bytes, int) -> int ''' An internal method to add the appropriate symlink record(s) to the ISO. Parameters: symlink_path - The absolute symlink path to add to the ISO. ...
[]
Please provide a description of the function:def _add_name(self, rr_name, curr_dr_len): # type: (bytes, int) -> int ''' An internal method to add the appropriate name records to the ISO. Parameters: rr_name - The Rock Ridge name to add to the ISO. curr_dr_len - The cur...
[]
Please provide a description of the function:def new(self, is_first_dir_record_of_root, rr_name, file_mode, symlink_path, rr_version, rr_relocated_child, rr_relocated, rr_relocated_parent, bytes_to_skip, curr_dr_len): # type: (bool, bytes, int, bytes, str, bool, bool, bool, int, int) -> ...
[]
Please provide a description of the function: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 p...
[]
Please provide a description of the function:def copy_file_links(self, src): # type: (RockRidge) -> None ''' Copy the number of file links from the source Rock Ridge entry into this Rock Ridge entry. Parameters: src - The source Rock Ridge entry to copy from. Re...
[]
Please provide a description of the function:def get_file_mode(self): # type: () -> int ''' Get the POSIX file mode bits for this Rock Ridge entry. Parameters: None. Returns: The POSIX file mode bits for this Rock Ridge entry. ''' if not self._i...
[]
Please provide a description of the function:def _is_symlink(self): # type: () -> bool ''' Internal method to determine whether this Rock Ridge entry is a symlink. ''' return len(self.dr_entries.sl_records) > 0 or len(self.ce_entries.sl_records) > 0
[]
Please provide a description of the function:def symlink_path(self): # type: () -> bytes ''' Get the path as a string of the symlink target of this Rock Ridge entry (if this is a symlink). Parameters: None. Returns: Symlink path as a string. '''...
[]
Please provide a description of the function:def child_link_record_exists(self): # type: () -> bool ''' Determine whether this Rock Ridge entry has a child link record (used for relocating deep directory records). Parameters: None. Returns: True if this...
[]
Please provide a description of the function:def child_link_update_from_dirrecord(self): # type: () -> None ''' Update the logical extent number stored in the child link record (if there is one), from the directory record entry that was stored in the child_link member. This is u...
[]
Please provide a description of the function:def child_link_extent(self): # type: () -> int ''' Get the extent of the child of this entry if it has one. Parameters: None. Returns: The logical block number of the child if it exists. ''' if not se...
[]
Please provide a description of the function:def parent_link_record_exists(self): # type: () -> bool ''' Determine whether this Rock Ridge entry has a parent link record (used for relocating deep directory records). Parameters: None: Returns: True if th...
[]
Please provide a description of the function:def parent_link_update_from_dirrecord(self): # type: () -> None ''' Update the logical extent number stored in the parent link record (if there is one), from the directory record entry that was stored in the parent_link member. This i...
[]
Please provide a description of the function:def parent_link_extent(self): # type: () -> int ''' Get the extent of the parent of this entry if it has one. Parameters: None. Returns: The logical block number of the parent if it exists. ''' if not...
[]
Please provide a description of the function:def relocated_record(self): # type: () -> bool ''' Determine whether this Rock Ridge entry has a relocated record (used for relocating deep directory records). Parameters: None. Returns: True if this Rock Rid...
[]
Please provide a description of the function:def update_ce_block(self, block): # type: (RockRidgeContinuationBlock) -> None ''' Update the Continuation Entry block object used by this Rock Ridge Record. Parameters: block - The new block object. Returns: Nothing...
[]
Please provide a description of the function:def track_entry(self, offset, length): # type: (int, int) -> None ''' Track an already allocated entry in this Rock Ridge Continuation Block. Parameters: offset - The offset at which to place the entry. length - The length o...
[]
Please provide a description of the function:def add_entry(self, length): # type: (int) -> int ''' Add a new entry to this Rock Ridge Continuation Block. This method attempts to find a gap that fits the new length anywhere within this Continuation Block. If successful, it retur...
[]
Please provide a description of the function:def remove_entry(self, offset, length): # type: (int, int) -> None ''' Given an offset and length, find and remove the entry in this block that corresponds. Parameters: offset - The offset of the entry to look for. l...
[]
Please provide a description of the function:def crc_ccitt(data): # type: (bytes) -> int ''' Calculate the CRC over a range of bytes using the CCITT polynomial. Parameters: data - The array of bytes to calculate the CRC over. Returns: The CCITT CRC of the data. ''' crc = 0 if ...
[]
Please provide a description of the function:def _ostaunicode(src): # type: (str) -> bytes ''' Internal function to create an OSTA byte string from a source string. ''' if have_py_3: bytename = src else: bytename = src.decode('utf-8') # type: ignore try: enc = byten...
[]
Please provide a description of the function:def _ostaunicode_zero_pad(src, fulllen): # type: (str, int) -> bytes ''' Internal function to create a zero-padded Identifier byte string from a source string. Parameters: src - The src string to start from. fulllen - The padded out length of t...
[]
Please provide a description of the function:def _compute_csum(data): # type: (bytes) -> int ''' A method to compute a simple checksum over the given data. Parameters: data - The data to compute the checksum over. Returns: The checksum. ''' def identity(x): # type: (int) -...
[]
Please provide a description of the function:def symlink_to_bytes(symlink_target): # type: (str) -> bytes ''' A function to generate UDF symlink data from a Unix-like path. Parameters: symlink_target - The Unix-like path that is the symlink. Returns: The UDF data corresponding to the syml...
[]