repository_name stringlengths 5 67 | func_path_in_repository stringlengths 4 234 | func_name stringlengths 0 314 | whole_func_string stringlengths 52 3.87M | language stringclasses 6
values | func_code_string stringlengths 52 3.87M | func_documentation_string stringlengths 1 47.2k | func_code_url stringlengths 85 339 |
|---|---|---|---|---|---|---|---|
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlibIO.readall | def readall(self):
# type: () -> bytes
'''
A method to read and return the remaining bytes in the file.
Parameters:
None.
Returns:
The rest of the data left in the file. If the file is at or past EOF,
returns an empty bytestring.
'''
i... | python | def readall(self):
# type: () -> bytes
'''
A method to read and return the remaining bytes in the file.
Parameters:
None.
Returns:
The rest of the data left in the file. If the file is at or past EOF,
returns an empty bytestring.
'''
i... | A method to read and return the remaining bytes in the file.
Parameters:
None.
Returns:
The rest of the data left in the file. If the file is at or past EOF,
returns an empty bytestring. | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L622-L643 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlibIO.seek | def seek(self, offset, whence=0):
# type: (int, int) -> int
'''
A method to change the stream position to byte offset offset. The
offset is interpreted relative to the position indicated by whence.
Valid values for whence are:
* 0 -- start of stream (the default); offse... | python | def seek(self, offset, whence=0):
# type: (int, int) -> int
'''
A method to change the stream position to byte offset offset. The
offset is interpreted relative to the position indicated by whence.
Valid values for whence are:
* 0 -- start of stream (the default); offse... | A method to change the stream position to byte offset offset. The
offset is interpreted relative to the position indicated by whence.
Valid values for whence are:
* 0 -- start of stream (the default); offset should be zero or positive
* 1 -- current stream position; offset may be negat... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L677-L731 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._parse_volume_descriptors | def _parse_volume_descriptors(self):
# type: () -> None
'''
An internal method to parse the volume descriptors on an ISO.
Parameters:
None.
Returns:
Nothing.
'''
# Ecma-119 says that the Volume Descriptor set is a sequence of volume
# de... | python | def _parse_volume_descriptors(self):
# type: () -> None
'''
An internal method to parse the volume descriptors on an ISO.
Parameters:
None.
Returns:
Nothing.
'''
# Ecma-119 says that the Volume Descriptor set is a sequence of volume
# de... | An internal method to parse the volume descriptors on an ISO.
Parameters:
None.
Returns:
Nothing. | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L838-L926 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._seek_to_extent | def _seek_to_extent(self, extent):
# type: (int) -> None
'''
An internal method to seek to a particular extent on the input ISO.
Parameters:
extent - The extent to seek to.
Returns:
Nothing.
'''
self._cdfp.seek(extent * self.pvd.logical_block_si... | python | def _seek_to_extent(self, extent):
# type: (int) -> None
'''
An internal method to seek to a particular extent on the input ISO.
Parameters:
extent - The extent to seek to.
Returns:
Nothing.
'''
self._cdfp.seek(extent * self.pvd.logical_block_si... | An internal method to seek to a particular extent on the input ISO.
Parameters:
extent - The extent to seek to.
Returns:
Nothing. | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L928-L938 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._find_rr_record | def _find_rr_record(self, rr_path):
# type: (bytes) -> dr.DirectoryRecord
'''
An internal method to find an directory record on the ISO given a Rock
Ridge path. If the entry is found, it returns the directory record
object corresponding to that entry. If the entry could not be ... | python | def _find_rr_record(self, rr_path):
# type: (bytes) -> dr.DirectoryRecord
'''
An internal method to find an directory record on the ISO given a Rock
Ridge path. If the entry is found, it returns the directory record
object corresponding to that entry. If the entry could not be ... | An internal method to find an directory record on the ISO given a Rock
Ridge path. If the entry is found, it returns the directory record
object corresponding to that entry. If the entry could not be found, a
pycdlibexception.PyCdlibInvalidInput is raised.
Parameters:
rr_path... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L957-L1032 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._find_joliet_record | def _find_joliet_record(self, joliet_path):
# type: (bytes) -> dr.DirectoryRecord
'''
An internal method to find an directory record on the ISO given a Joliet
path. If the entry is found, it returns the directory record object
corresponding to that entry. If the entry could not... | python | def _find_joliet_record(self, joliet_path):
# type: (bytes) -> dr.DirectoryRecord
'''
An internal method to find an directory record on the ISO given a Joliet
path. If the entry is found, it returns the directory record object
corresponding to that entry. If the entry could not... | An internal method to find an directory record on the ISO given a Joliet
path. If the entry is found, it returns the directory record object
corresponding to that entry. If the entry could not be found, a
pycdlibexception.PyCdlibInvalidInput is raised.
Parameters:
joliet_path... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L1035-L1050 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._find_udf_record | def _find_udf_record(self, udf_path):
# type: (bytes) -> Tuple[Optional[udfmod.UDFFileIdentifierDescriptor], udfmod.UDFFileEntry]
'''
An internal method to find an directory record on the ISO given a UDF
path. If the entry is found, it returns the directory record object
corresp... | python | def _find_udf_record(self, udf_path):
# type: (bytes) -> Tuple[Optional[udfmod.UDFFileIdentifierDescriptor], udfmod.UDFFileEntry]
'''
An internal method to find an directory record on the ISO given a UDF
path. If the entry is found, it returns the directory record object
corresp... | An internal method to find an directory record on the ISO given a UDF
path. If the entry is found, it returns the directory record object
corresponding to that entry. If the entry could not be found, a
pycdlibexception.PyCdlibInvalidInput is raised.
Parameters:
udf_path - The... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L1053-L1091 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._iso_name_and_parent_from_path | def _iso_name_and_parent_from_path(self, iso_path):
# type: (bytes) -> Tuple[bytes, dr.DirectoryRecord]
'''
An internal method to find the parent directory record and name given an
ISO path. If the parent is found, return a tuple containing the
basename of the path and the paren... | python | def _iso_name_and_parent_from_path(self, iso_path):
# type: (bytes) -> Tuple[bytes, dr.DirectoryRecord]
'''
An internal method to find the parent directory record and name given an
ISO path. If the parent is found, return a tuple containing the
basename of the path and the paren... | An internal method to find the parent directory record and name given an
ISO path. If the parent is found, return a tuple containing the
basename of the path and the parent directory record object.
Parameters:
iso_path - The absolute ISO path to the entry on the ISO.
Returns:
... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L1093-L1112 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._joliet_name_and_parent_from_path | def _joliet_name_and_parent_from_path(self, joliet_path):
# type: (bytes) -> Tuple[bytes, dr.DirectoryRecord]
'''
An internal method to find the parent directory record and name given a
Joliet path. If the parent is found, return a tuple containing the
basename of the path and t... | python | def _joliet_name_and_parent_from_path(self, joliet_path):
# type: (bytes) -> Tuple[bytes, dr.DirectoryRecord]
'''
An internal method to find the parent directory record and name given a
Joliet path. If the parent is found, return a tuple containing the
basename of the path and t... | An internal method to find the parent directory record and name given a
Joliet path. If the parent is found, return a tuple containing the
basename of the path and the parent directory record object.
Parameters:
joliet_path - The absolute Joliet path to the entry on the ISO.
R... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L1114-L1135 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._udf_name_and_parent_from_path | def _udf_name_and_parent_from_path(self, udf_path):
# type: (bytes) -> Tuple[bytes, udfmod.UDFFileEntry]
'''
An internal method to find the parent directory record and name given a
UDF path. If the parent is found, return a tuple containing the basename
of the path and the paren... | python | def _udf_name_and_parent_from_path(self, udf_path):
# type: (bytes) -> Tuple[bytes, udfmod.UDFFileEntry]
'''
An internal method to find the parent directory record and name given a
UDF path. If the parent is found, return a tuple containing the basename
of the path and the paren... | An internal method to find the parent directory record and name given a
UDF path. If the parent is found, return a tuple containing the basename
of the path and the parent UDF File Entry object.
Parameters:
udf_path - The absolute UDF path to the entry on the ISO.
Returns:
... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L1137-L1154 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._set_rock_ridge | def _set_rock_ridge(self, rr):
# type: (str) -> None
'''
An internal method to set the Rock Ridge version of the ISO given the
Rock Ridge version of the previous entry.
Parameters:
rr - The version of rr from the last directory record.
Returns:
Nothing.... | python | def _set_rock_ridge(self, rr):
# type: (str) -> None
'''
An internal method to set the Rock Ridge version of the ISO given the
Rock Ridge version of the previous entry.
Parameters:
rr - The version of rr from the last directory record.
Returns:
Nothing.... | An internal method to set the Rock Ridge version of the ISO given the
Rock Ridge version of the previous entry.
Parameters:
rr - The version of rr from the last directory record.
Returns:
Nothing. | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L1156-L1178 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._walk_directories | def _walk_directories(self, vd, extent_to_ptr, extent_to_inode, path_table_records):
# type: (headervd.PrimaryOrSupplementaryVD, Dict[int, path_table_record.PathTableRecord], Dict[int, inode.Inode], List[path_table_record.PathTableRecord]) -> Tuple[int, int]
'''
An internal method to walk the di... | python | def _walk_directories(self, vd, extent_to_ptr, extent_to_inode, path_table_records):
# type: (headervd.PrimaryOrSupplementaryVD, Dict[int, path_table_record.PathTableRecord], Dict[int, inode.Inode], List[path_table_record.PathTableRecord]) -> Tuple[int, int]
'''
An internal method to walk the di... | An internal method to walk the directory records in a volume descriptor,
starting with the root. For each child in the directory record,
we create a new dr.DirectoryRecord object and append it to the parent.
Parameters:
vd - The volume descriptor to walk.
extent_to_ptr - A di... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L1180-L1384 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._initialize | def _initialize(self):
# type: () -> None
'''
An internal method to re-initialize the object. Called from
both __init__ and close.
Parameters:
None.
Returns:
Nothing.
'''
self._cdfp = BytesIO()
self.svds = [] # type: List[heade... | python | def _initialize(self):
# type: () -> None
'''
An internal method to re-initialize the object. Called from
both __init__ and close.
Parameters:
None.
Returns:
Nothing.
'''
self._cdfp = BytesIO()
self.svds = [] # type: List[heade... | An internal method to re-initialize the object. Called from
both __init__ and close.
Parameters:
None.
Returns:
Nothing. | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L1386-L1432 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._parse_path_table | def _parse_path_table(self, ptr_size, extent):
# type: (int, int) -> Tuple[List[path_table_record.PathTableRecord], Dict[int, path_table_record.PathTableRecord]]
'''
An internal method to parse a path table on an ISO. For each path
table entry found, a Path Table Record object is create... | python | def _parse_path_table(self, ptr_size, extent):
# type: (int, int) -> Tuple[List[path_table_record.PathTableRecord], Dict[int, path_table_record.PathTableRecord]]
'''
An internal method to parse a path table on an ISO. For each path
table entry found, a Path Table Record object is create... | An internal method to parse a path table on an ISO. For each path
table entry found, a Path Table Record object is created, and the
callback is called.
Parameters:
vd - The volume descriptor that these path table records correspond to.
extent - The extent at which this path t... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L1434-L1464 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._check_and_parse_eltorito | def _check_and_parse_eltorito(self, br):
# type: (headervd.BootRecord) -> None
'''
An internal method to examine a Boot Record and see if it is an
El Torito Boot Record. If it is, parse the El Torito Boot Catalog,
verification entry, initial entry, and any additional section ent... | python | def _check_and_parse_eltorito(self, br):
# type: (headervd.BootRecord) -> None
'''
An internal method to examine a Boot Record and see if it is an
El Torito Boot Record. If it is, parse the El Torito Boot Catalog,
verification entry, initial entry, and any additional section ent... | An internal method to examine a Boot Record and see if it is an
El Torito Boot Record. If it is, parse the El Torito Boot Catalog,
verification entry, initial entry, and any additional section entries.
Parameters:
br - The boot record to examine for an El Torito signature.
Ret... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L1466-L1502 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._reshuffle_extents | def _reshuffle_extents(self):
# type: () -> None
'''
An internal method that is one of the keys of PyCdlib's ability to keep
the in-memory metadata consistent at all times. After making any
changes to the ISO, most API calls end up calling this method. This
method will ... | python | def _reshuffle_extents(self):
# type: () -> None
'''
An internal method that is one of the keys of PyCdlib's ability to keep
the in-memory metadata consistent at all times. After making any
changes to the ISO, most API calls end up calling this method. This
method will ... | An internal method that is one of the keys of PyCdlib's ability to keep
the in-memory metadata consistent at all times. After making any
changes to the ISO, most API calls end up calling this method. This
method will run through the entire ISO, assigning extents to each of
the pieces o... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L1504-L1816 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._add_child_to_dr | def _add_child_to_dr(self, child, logical_block_size):
# type: (dr.DirectoryRecord, int) -> int
'''
An internal method to add a child to a directory record, expanding the
space in the Volume Descriptor(s) if necessary.
Parameters:
child - The new child.
logical... | python | def _add_child_to_dr(self, child, logical_block_size):
# type: (dr.DirectoryRecord, int) -> int
'''
An internal method to add a child to a directory record, expanding the
space in the Volume Descriptor(s) if necessary.
Parameters:
child - The new child.
logical... | An internal method to add a child to a directory record, expanding the
space in the Volume Descriptor(s) if necessary.
Parameters:
child - The new child.
logical_block_size - The size of one logical block.
Returns:
The number of bytes to add for this directory record ... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L1818-L1856 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._remove_child_from_dr | def _remove_child_from_dr(self, child, index, logical_block_size):
# type: (dr.DirectoryRecord, int, int) -> int
'''
An internal method to remove a child from a directory record, shrinking
the space in the Volume Descriptor if necessary.
Parameters:
child - The child to... | python | def _remove_child_from_dr(self, child, index, logical_block_size):
# type: (dr.DirectoryRecord, int, int) -> int
'''
An internal method to remove a child from a directory record, shrinking
the space in the Volume Descriptor if necessary.
Parameters:
child - The child to... | An internal method to remove a child from a directory record, shrinking
the space in the Volume Descriptor if necessary.
Parameters:
child - The child to remove.
index - The index of the child into the parent's child array.
logical_block_size - The size of one logical block.
... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L1858-L1885 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._add_to_ptr_size | def _add_to_ptr_size(self, ptr):
# type: (path_table_record.PathTableRecord) -> int
'''
An internal method to add a PTR to a VD, adding space to the VD if
necessary.
Parameters:
ptr - The PTR to add to the vd.
Returns:
The number of additional bytes tha... | python | def _add_to_ptr_size(self, ptr):
# type: (path_table_record.PathTableRecord) -> int
'''
An internal method to add a PTR to a VD, adding space to the VD if
necessary.
Parameters:
ptr - The PTR to add to the vd.
Returns:
The number of additional bytes tha... | An internal method to add a PTR to a VD, adding space to the VD if
necessary.
Parameters:
ptr - The PTR to add to the vd.
Returns:
The number of additional bytes that are needed to fit the new PTR
(this may be zero). | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L1887-L1907 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._remove_from_ptr_size | def _remove_from_ptr_size(self, ptr):
# type: (path_table_record.PathTableRecord) -> int
'''
An internal method to remove a PTR from a VD, removing space from the VD if
necessary.
Parameters:
ptr - The PTR to remove from the VD.
Returns:
The number of b... | python | def _remove_from_ptr_size(self, ptr):
# type: (path_table_record.PathTableRecord) -> int
'''
An internal method to remove a PTR from a VD, removing space from the VD if
necessary.
Parameters:
ptr - The PTR to remove from the VD.
Returns:
The number of b... | An internal method to remove a PTR from a VD, removing space from the VD if
necessary.
Parameters:
ptr - The PTR to remove from the VD.
Returns:
The number of bytes to remove from the VDs (this may be zero). | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L1909-L1928 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._find_or_create_rr_moved | def _find_or_create_rr_moved(self):
# type: () -> int
'''
An internal method to find the /RR_MOVED directory on the ISO. If it
already exists, the directory record to it is returned. If it doesn't
yet exist, it is created and the directory record to it is returned.
Par... | python | def _find_or_create_rr_moved(self):
# type: () -> int
'''
An internal method to find the /RR_MOVED directory on the ISO. If it
already exists, the directory record to it is returned. If it doesn't
yet exist, it is created and the directory record to it is returned.
Par... | An internal method to find the /RR_MOVED directory on the ISO. If it
already exists, the directory record to it is returned. If it doesn't
yet exist, it is created and the directory record to it is returned.
Parameters:
None.
Returns:
The number of additional bytes n... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L1930-L1975 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._calculate_eltorito_boot_info_table_csum | def _calculate_eltorito_boot_info_table_csum(self, data_fp, data_len):
# type: (BinaryIO, int) -> int
'''
An internal method to calculate the checksum for an El Torito Boot Info
Table. This checksum is a simple 32-bit checksum over all of the data
in the boot file, starting righ... | python | def _calculate_eltorito_boot_info_table_csum(self, data_fp, data_len):
# type: (BinaryIO, int) -> int
'''
An internal method to calculate the checksum for an El Torito Boot Info
Table. This checksum is a simple 32-bit checksum over all of the data
in the boot file, starting righ... | An internal method to calculate the checksum for an El Torito Boot Info
Table. This checksum is a simple 32-bit checksum over all of the data
in the boot file, starting right after the Boot Info Table itself.
Parameters:
data_fp - The file object to read the input data from.
... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L1977-L2011 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._check_for_eltorito_boot_info_table | def _check_for_eltorito_boot_info_table(self, ino):
# type: (inode.Inode) -> None
'''
An internal method to check a boot directory record to see if it has
an El Torito Boot Info Table embedded inside of it.
Parameters:
ino - The Inode to check for a Boot Info Table.
... | python | def _check_for_eltorito_boot_info_table(self, ino):
# type: (inode.Inode) -> None
'''
An internal method to check a boot directory record to see if it has
an El Torito Boot Info Table embedded inside of it.
Parameters:
ino - The Inode to check for a Boot Info Table.
... | An internal method to check a boot directory record to see if it has
an El Torito Boot Info Table embedded inside of it.
Parameters:
ino - The Inode to check for a Boot Info Table.
Returns:
Nothing. | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L2013-L2037 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._check_rr_name | def _check_rr_name(self, rr_name):
# type: (Optional[str]) -> bytes
'''
An internal method to check whether this ISO requires or does not
require a Rock Ridge path.
Parameters:
rr_name - The Rock Ridge name.
Returns:
The Rock Ridge name in bytes if this... | python | def _check_rr_name(self, rr_name):
# type: (Optional[str]) -> bytes
'''
An internal method to check whether this ISO requires or does not
require a Rock Ridge path.
Parameters:
rr_name - The Rock Ridge name.
Returns:
The Rock Ridge name in bytes if this... | An internal method to check whether this ISO requires or does not
require a Rock Ridge path.
Parameters:
rr_name - The Rock Ridge name.
Returns:
The Rock Ridge name in bytes if this is a Rock Ridge ISO, None otherwise. | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L2039-L2062 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._normalize_joliet_path | def _normalize_joliet_path(self, joliet_path):
# type: (str) -> bytes
'''
An internal method to check whether this ISO does or does not require
a Joliet path. If a Joliet path is required, the path is normalized
and returned.
Parameters:
joliet_path - The jolie... | python | def _normalize_joliet_path(self, joliet_path):
# type: (str) -> bytes
'''
An internal method to check whether this ISO does or does not require
a Joliet path. If a Joliet path is required, the path is normalized
and returned.
Parameters:
joliet_path - The jolie... | An internal method to check whether this ISO does or does not require
a Joliet path. If a Joliet path is required, the path is normalized
and returned.
Parameters:
joliet_path - The joliet_path to normalize (if necessary).
Returns:
The normalized joliet_path if this I... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L2064-L2085 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._link_eltorito | def _link_eltorito(self, extent_to_inode):
# type: (Dict[int, inode.Inode]) -> None
'''
An internal method to link the El Torito entries into their
corresponding Directory Records, creating new ones if they are
'hidden'. Should only be called on an El Torito ISO.
Parame... | python | def _link_eltorito(self, extent_to_inode):
# type: (Dict[int, inode.Inode]) -> None
'''
An internal method to link the El Torito entries into their
corresponding Directory Records, creating new ones if they are
'hidden'. Should only be called on an El Torito ISO.
Parame... | An internal method to link the El Torito entries into their
corresponding Directory Records, creating new ones if they are
'hidden'. Should only be called on an El Torito ISO.
Parameters:
extent_to_inode - The map that maps extents to Inodes.
Returns:
Nothing. | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L2087-L2121 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._parse_udf_vol_descs | def _parse_udf_vol_descs(self, extent, length, descs):
# type: (int, int, PyCdlib._UDFDescriptors) -> None
'''
An internal method to parse a set of UDF Volume Descriptors.
Parameters:
extent - The extent at which to start parsing.
length - The number of bytes to read f... | python | def _parse_udf_vol_descs(self, extent, length, descs):
# type: (int, int, PyCdlib._UDFDescriptors) -> None
'''
An internal method to parse a set of UDF Volume Descriptors.
Parameters:
extent - The extent at which to start parsing.
length - The number of bytes to read f... | An internal method to parse a set of UDF Volume Descriptors.
Parameters:
extent - The extent at which to start parsing.
length - The number of bytes to read from the incoming ISO.
descs - The _UDFDescriptors object to store parsed objects into.
Returns:
Nothing. | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L2123-L2169 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._parse_udf_descriptors | def _parse_udf_descriptors(self):
# type: () -> None
'''
An internal method to parse the UDF descriptors on the ISO. This should
only be called if it the ISO has a valid UDF Volume Recognition Sequence
at the beginning of the ISO.
Parameters:
None.
Retu... | python | def _parse_udf_descriptors(self):
# type: () -> None
'''
An internal method to parse the UDF descriptors on the ISO. This should
only be called if it the ISO has a valid UDF Volume Recognition Sequence
at the beginning of the ISO.
Parameters:
None.
Retu... | An internal method to parse the UDF descriptors on the ISO. This should
only be called if it the ISO has a valid UDF Volume Recognition Sequence
at the beginning of the ISO.
Parameters:
None.
Returns:
Nothing. | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L2171-L2248 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._parse_udf_file_entry | def _parse_udf_file_entry(self, abs_file_entry_extent, icb, parent):
# type: (int, udfmod.UDFLongAD, Optional[udfmod.UDFFileEntry]) -> Optional[udfmod.UDFFileEntry]
'''
An internal method to parse a single UDF File Entry and return the
corresponding object.
Parameters:
... | python | def _parse_udf_file_entry(self, abs_file_entry_extent, icb, parent):
# type: (int, udfmod.UDFLongAD, Optional[udfmod.UDFFileEntry]) -> Optional[udfmod.UDFFileEntry]
'''
An internal method to parse a single UDF File Entry and return the
corresponding object.
Parameters:
... | An internal method to parse a single UDF File Entry and return the
corresponding object.
Parameters:
part_start - The extent number the partition starts at.
icb - The ICB object for the data.
parent - The parent of the UDF File Entry.
Returns:
A UDF File Entr... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L2250-L2281 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._walk_udf_directories | def _walk_udf_directories(self, extent_to_inode):
# type: (Dict[int, inode.Inode]) -> None
'''
An internal method to walk a UDF filesystem and add all the metadata
to this object.
Parameters:
extent_to_inode - A map from extent numbers to Inodes.
Returns:
... | python | def _walk_udf_directories(self, extent_to_inode):
# type: (Dict[int, inode.Inode]) -> None
'''
An internal method to walk a UDF filesystem and add all the metadata
to this object.
Parameters:
extent_to_inode - A map from extent numbers to Inodes.
Returns:
... | An internal method to walk a UDF filesystem and add all the metadata
to this object.
Parameters:
extent_to_inode - A map from extent numbers to Inodes.
Returns:
Nothing. | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L2283-L2373 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._open_fp | def _open_fp(self, fp):
# type: (BinaryIO) -> None
'''
An internal method to open an existing ISO for inspection and
modification. Note that the file object passed in here must stay open
for the lifetime of this object, as the PyCdlib class uses it internally
to do writi... | python | def _open_fp(self, fp):
# type: (BinaryIO) -> None
'''
An internal method to open an existing ISO for inspection and
modification. Note that the file object passed in here must stay open
for the lifetime of this object, as the PyCdlib class uses it internally
to do writi... | An internal method to open an existing ISO for inspection and
modification. Note that the file object passed in here must stay open
for the lifetime of this object, as the PyCdlib class uses it internally
to do writing and reading operations.
Parameters:
fp - The file object c... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L2375-L2530 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._get_and_write_fp | def _get_and_write_fp(self, iso_path, outfp, blocksize):
# type: (bytes, BinaryIO, int) -> None
'''
An internal method to fetch a single file from the ISO and write it out
to the file object.
Parameters:
iso_path - The absolute path to the file to get data from.
... | python | def _get_and_write_fp(self, iso_path, outfp, blocksize):
# type: (bytes, BinaryIO, int) -> None
'''
An internal method to fetch a single file from the ISO and write it out
to the file object.
Parameters:
iso_path - The absolute path to the file to get data from.
... | An internal method to fetch a single file from the ISO and write it out
to the file object.
Parameters:
iso_path - The absolute path to the file to get data from.
outfp - The file object to write data to.
blocksize - The blocksize to use when copying data.
Returns:
... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L2532-L2555 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._udf_get_file_from_iso_fp | def _udf_get_file_from_iso_fp(self, outfp, blocksize, udf_path):
# type: (BinaryIO, int, bytes) -> None
'''
An internal method to fetch a single UDF file from the ISO and write it
out to the file object.
Parameters:
outfp - The file object to write data to.
blo... | python | def _udf_get_file_from_iso_fp(self, outfp, blocksize, udf_path):
# type: (BinaryIO, int, bytes) -> None
'''
An internal method to fetch a single UDF file from the ISO and write it
out to the file object.
Parameters:
outfp - The file object to write data to.
blo... | An internal method to fetch a single UDF file from the ISO and write it
out to the file object.
Parameters:
outfp - The file object to write data to.
blocksize - The number of bytes in each transfer.
udf_path - The absolute UDF path to lookup on the ISO.
Returns:
... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L2557-L2585 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._get_file_from_iso_fp | def _get_file_from_iso_fp(self, outfp, blocksize, iso_path, rr_path, joliet_path):
# type: (BinaryIO, int, Optional[bytes], Optional[bytes], Optional[bytes]) -> None
'''
An internal method to fetch a single file from the ISO and write it out
to the file object.
Parameters:
... | python | def _get_file_from_iso_fp(self, outfp, blocksize, iso_path, rr_path, joliet_path):
# type: (BinaryIO, int, Optional[bytes], Optional[bytes], Optional[bytes]) -> None
'''
An internal method to fetch a single file from the ISO and write it out
to the file object.
Parameters:
... | An internal method to fetch a single file from the ISO and write it out
to the file object.
Parameters:
outfp - The file object to write data to.
blocksize - The number of bytes in each transfer.
iso_path - The absolute ISO9660 path to lookup on the ISO (exclusive
... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L2587-L2661 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._outfp_write_with_check | def _outfp_write_with_check(self, outfp, data, enable_overwrite_check=True):
# type: (BinaryIO, bytes, bool) -> None
'''
Internal method to write data out to the output file descriptor,
ensuring that it doesn't go beyond the bounds of the ISO.
Parameters:
outfp - The fi... | python | def _outfp_write_with_check(self, outfp, data, enable_overwrite_check=True):
# type: (BinaryIO, bytes, bool) -> None
'''
Internal method to write data out to the output file descriptor,
ensuring that it doesn't go beyond the bounds of the ISO.
Parameters:
outfp - The fi... | Internal method to write data out to the output file descriptor,
ensuring that it doesn't go beyond the bounds of the ISO.
Parameters:
outfp - The file object to write to.
data - The actual data to write.
enable_overwrite_check - Whether to do overwrite checking if it is enab... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L2686-L2709 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._output_file_data | def _output_file_data(self, outfp, blocksize, ino):
# type: (BinaryIO, int, inode.Inode) -> int
'''
Internal method to write a directory record entry out.
Parameters:
outfp - The file object to write the data to.
blocksize - The blocksize to use when writing the data o... | python | def _output_file_data(self, outfp, blocksize, ino):
# type: (BinaryIO, int, inode.Inode) -> int
'''
Internal method to write a directory record entry out.
Parameters:
outfp - The file object to write the data to.
blocksize - The blocksize to use when writing the data o... | Internal method to write a directory record entry out.
Parameters:
outfp - The file object to write the data to.
blocksize - The blocksize to use when writing the data out.
ino - The Inode to write.
Returns:
The total number of bytes written out. | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L2711-L2744 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._write_directory_records | def _write_directory_records(self, vd, outfp, progress):
# type: (headervd.PrimaryOrSupplementaryVD, BinaryIO, PyCdlib._Progress) -> None
'''
An internal method to write out the directory records from a particular
Volume Descriptor.
Parameters:
vd - The Volume Descripto... | python | def _write_directory_records(self, vd, outfp, progress):
# type: (headervd.PrimaryOrSupplementaryVD, BinaryIO, PyCdlib._Progress) -> None
'''
An internal method to write out the directory records from a particular
Volume Descriptor.
Parameters:
vd - The Volume Descripto... | An internal method to write out the directory records from a particular
Volume Descriptor.
Parameters:
vd - The Volume Descriptor to write the Directory Records from.
outfp - The file object to write data to.
progress - The _Progress object to use for outputting progress.
... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L2784-L2850 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._write_udf_descs | def _write_udf_descs(self, descs, outfp, progress):
# type: (PyCdlib._UDFDescriptors, BinaryIO, PyCdlib._Progress) -> None
'''
An internal method to write out a UDF Descriptor sequence.
Parameters:
descs - The UDF Descriptors object to write out.
outfp - The output fil... | python | def _write_udf_descs(self, descs, outfp, progress):
# type: (PyCdlib._UDFDescriptors, BinaryIO, PyCdlib._Progress) -> None
'''
An internal method to write out a UDF Descriptor sequence.
Parameters:
descs - The UDF Descriptors object to write out.
outfp - The output fil... | An internal method to write out a UDF Descriptor sequence.
Parameters:
descs - The UDF Descriptors object to write out.
outfp - The output file descriptor to use for writing.
progress - The _Progress object to use for updating progress.
Returns:
Nothing. | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L2852-L2894 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._write_fp | def _write_fp(self, outfp, blocksize, progress_cb, progress_opaque):
# type: (BinaryIO, int, Optional[Callable[[int, int, Any], None]], Optional[Any]) -> None
'''
Write a properly formatted ISO out to the file object passed in. This
also goes by the name of 'mastering'.
Paramet... | python | def _write_fp(self, outfp, blocksize, progress_cb, progress_opaque):
# type: (BinaryIO, int, Optional[Callable[[int, int, Any], None]], Optional[Any]) -> None
'''
Write a properly formatted ISO out to the file object passed in. This
also goes by the name of 'mastering'.
Paramet... | Write a properly formatted ISO out to the file object passed in. This
also goes by the name of 'mastering'.
Parameters:
outfp - The file object to write the data to.
blocksize - The blocksize to use when copying data.
progress_cb - If not None, a function to call as the writ... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L2896-L3094 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._update_rr_ce_entry | def _update_rr_ce_entry(self, rec):
# type: (dr.DirectoryRecord) -> int
'''
An internal method to update the Rock Ridge CE entry for the given
record.
Parameters:
rec - The record to update the Rock Ridge CE entry for (if it exists).
Returns:
The number... | python | def _update_rr_ce_entry(self, rec):
# type: (dr.DirectoryRecord) -> int
'''
An internal method to update the Rock Ridge CE entry for the given
record.
Parameters:
rec - The record to update the Rock Ridge CE entry for (if it exists).
Returns:
The number... | An internal method to update the Rock Ridge CE entry for the given
record.
Parameters:
rec - The record to update the Rock Ridge CE entry for (if it exists).
Returns:
The number of additional bytes needed for this Rock Ridge CE entry. | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L3096-L3115 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._finish_add | def _finish_add(self, num_bytes_to_add, num_partition_bytes_to_add):
# type: (int, int) -> None
'''
An internal method to do all of the accounting needed whenever
something is added to the ISO. This method should only be called by
public API implementations.
Parameters:... | python | def _finish_add(self, num_bytes_to_add, num_partition_bytes_to_add):
# type: (int, int) -> None
'''
An internal method to do all of the accounting needed whenever
something is added to the ISO. This method should only be called by
public API implementations.
Parameters:... | An internal method to do all of the accounting needed whenever
something is added to the ISO. This method should only be called by
public API implementations.
Parameters:
num_bytes_to_add - The number of additional bytes to add to all
descriptors.
... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L3117-L3151 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._finish_remove | def _finish_remove(self, num_bytes_to_remove, is_partition):
# type: (int, bool) -> None
'''
An internal method to do all of the accounting needed whenever
something is removed from the ISO. This method should only be called
by public API implementations.
Parameters:
... | python | def _finish_remove(self, num_bytes_to_remove, is_partition):
# type: (int, bool) -> None
'''
An internal method to do all of the accounting needed whenever
something is removed from the ISO. This method should only be called
by public API implementations.
Parameters:
... | An internal method to do all of the accounting needed whenever
something is removed from the ISO. This method should only be called
by public API implementations.
Parameters:
num_bytes_to_remove - The number of additional bytes to remove from the descriptors.
is_partition - W... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L3153-L3185 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._add_hard_link_to_rec | def _add_hard_link_to_rec(self, old_rec, boot_catalog_old, **kwargs):
# type: (Any, bool, str) -> int
'''
Add a hard link to the ISO. Hard links are alternate names for the
same file contents that don't take up any additional space on the ISO.
This API can be used to create hard... | python | def _add_hard_link_to_rec(self, old_rec, boot_catalog_old, **kwargs):
# type: (Any, bool, str) -> int
'''
Add a hard link to the ISO. Hard links are alternate names for the
same file contents that don't take up any additional space on the ISO.
This API can be used to create hard... | Add a hard link to the ISO. Hard links are alternate names for the
same file contents that don't take up any additional space on the ISO.
This API can be used to create hard links between two files on the
ISO9660 filesystem, between two files on the Joliet filesystem, or
between a file ... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L3187-L3306 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._add_fp | def _add_fp(self, fp, length, manage_fp, old_iso_path, orig_rr_name, joliet_path,
udf_path, file_mode, eltorito_catalog):
# type: (Optional[BinaryIO], int, bool, str, Optional[str], Optional[str], Optional[str], Optional[int], bool) -> int
'''
An internal method to add a file to ... | python | def _add_fp(self, fp, length, manage_fp, old_iso_path, orig_rr_name, joliet_path,
udf_path, file_mode, eltorito_catalog):
# type: (Optional[BinaryIO], int, bool, str, Optional[str], Optional[str], Optional[str], Optional[int], bool) -> int
'''
An internal method to add a file to ... | An internal method to add a file to the ISO. If the ISO contains Rock
Ridge, then a Rock Ridge name must be provided. If the ISO contains
Joliet, then a Joliet path is not required but is highly recommended.
Note that the caller must ensure that the file remains open for the
lifetime o... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L3308-L3433 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._rm_dr_link | def _rm_dr_link(self, rec):
# type: (dr.DirectoryRecord) -> int
'''
An internal method to remove a Directory Record link given the record.
Parameters:
rec - The Directory Record to remove.
Returns:
The number of bytes to remove from the ISO.
'''
... | python | def _rm_dr_link(self, rec):
# type: (dr.DirectoryRecord) -> int
'''
An internal method to remove a Directory Record link given the record.
Parameters:
rec - The Directory Record to remove.
Returns:
The number of bytes to remove from the ISO.
'''
... | An internal method to remove a Directory Record link given the record.
Parameters:
rec - The Directory Record to remove.
Returns:
The number of bytes to remove from the ISO. | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L3435-L3490 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._rm_udf_file_ident | def _rm_udf_file_ident(self, parent, fi):
# type: (udfmod.UDFFileEntry, bytes) -> int
'''
An internal method to remove a UDF File Identifier from the parent
and remove any space from the Logical Volume as necessary.
Parameters:
parent - The parent entry to remove the UD... | python | def _rm_udf_file_ident(self, parent, fi):
# type: (udfmod.UDFFileEntry, bytes) -> int
'''
An internal method to remove a UDF File Identifier from the parent
and remove any space from the Logical Volume as necessary.
Parameters:
parent - The parent entry to remove the UD... | An internal method to remove a UDF File Identifier from the parent
and remove any space from the Logical Volume as necessary.
Parameters:
parent - The parent entry to remove the UDF File Identifier from.
fi - The file identifier to remove.
Returns:
The number of bytes... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L3492-L3511 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._rm_udf_link | def _rm_udf_link(self, rec):
# type: (udfmod.UDFFileEntry) -> int
'''
An internal method to remove a UDF File Entry link.
Parameters:
rec - The UDF File Entry to remove.
Returns:
The number of bytes to remove from the ISO.
'''
if not rec.is_file... | python | def _rm_udf_link(self, rec):
# type: (udfmod.UDFFileEntry) -> int
'''
An internal method to remove a UDF File Entry link.
Parameters:
rec - The UDF File Entry to remove.
Returns:
The number of bytes to remove from the ISO.
'''
if not rec.is_file... | An internal method to remove a UDF File Entry link.
Parameters:
rec - The UDF File Entry to remove.
Returns:
The number of bytes to remove from the ISO. | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L3513-L3578 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._add_joliet_dir | def _add_joliet_dir(self, joliet_path):
# type: (bytes) -> int
'''
An internal method to add a joliet directory to the ISO.
Parameters:
joliet_path - The path to add to the Joliet portion of the ISO.
Returns:
The number of additional bytes needed on the ISO to ... | python | def _add_joliet_dir(self, joliet_path):
# type: (bytes) -> int
'''
An internal method to add a joliet directory to the ISO.
Parameters:
joliet_path - The path to add to the Joliet portion of the ISO.
Returns:
The number of additional bytes needed on the ISO to ... | An internal method to add a joliet directory to the ISO.
Parameters:
joliet_path - The path to add to the Joliet portion of the ISO.
Returns:
The number of additional bytes needed on the ISO to fit this directory. | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L3580-L3617 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._rm_joliet_dir | def _rm_joliet_dir(self, joliet_path):
# type: (bytes) -> int
'''
An internal method to remove a directory from the Joliet portion of the ISO.
Parameters:
joliet_path - The Joliet directory to remove.
Returns:
The number of bytes to remove from the ISO for this... | python | def _rm_joliet_dir(self, joliet_path):
# type: (bytes) -> int
'''
An internal method to remove a directory from the Joliet portion of the ISO.
Parameters:
joliet_path - The Joliet directory to remove.
Returns:
The number of bytes to remove from the ISO for this... | An internal method to remove a directory from the Joliet portion of the ISO.
Parameters:
joliet_path - The Joliet directory to remove.
Returns:
The number of bytes to remove from the ISO for this Joliet directory. | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L3619-L3643 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._get_entry | def _get_entry(self, iso_path, rr_path, joliet_path):
# type: (Optional[bytes], Optional[bytes], Optional[bytes]) -> dr.DirectoryRecord
'''
Internal method to get the directory record for a particular path.
Parameters:
iso_path - The path on the ISO filesystem to look up the re... | python | def _get_entry(self, iso_path, rr_path, joliet_path):
# type: (Optional[bytes], Optional[bytes], Optional[bytes]) -> dr.DirectoryRecord
'''
Internal method to get the directory record for a particular path.
Parameters:
iso_path - The path on the ISO filesystem to look up the re... | Internal method to get the directory record for a particular path.
Parameters:
iso_path - The path on the ISO filesystem to look up the record for.
rr_path - The Rock Ridge path on the ISO filesystem to look up the
record for.
joliet_path - The path on the Joliet f... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L3645-L3673 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._get_udf_entry | def _get_udf_entry(self, udf_path):
# type: (str) -> udfmod.UDFFileEntry
'''
Internal method to get the UDF File Entry for a particular path.
Parameters:
udf_path - The path on the UDF filesystem to look up the record for.
Returns:
A udfmod.UDFFileEntry object ... | python | def _get_udf_entry(self, udf_path):
# type: (str) -> udfmod.UDFFileEntry
'''
Internal method to get the UDF File Entry for a particular path.
Parameters:
udf_path - The path on the UDF filesystem to look up the record for.
Returns:
A udfmod.UDFFileEntry object ... | Internal method to get the UDF File Entry for a particular path.
Parameters:
udf_path - The path on the UDF filesystem to look up the record for.
Returns:
A udfmod.UDFFileEntry object representing the path. | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L3675-L3692 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._create_dot | def _create_dot(self, vd, parent, rock_ridge, xa, file_mode):
# type: (headervd.PrimaryOrSupplementaryVD, dr.DirectoryRecord, str, bool, int) -> None
'''
An internal method to create a new 'dot' Directory Record.
Parameters:
vd - The volume descriptor to attach the 'dot' Direct... | python | def _create_dot(self, vd, parent, rock_ridge, xa, file_mode):
# type: (headervd.PrimaryOrSupplementaryVD, dr.DirectoryRecord, str, bool, int) -> None
'''
An internal method to create a new 'dot' Directory Record.
Parameters:
vd - The volume descriptor to attach the 'dot' Direct... | An internal method to create a new 'dot' Directory Record.
Parameters:
vd - The volume descriptor to attach the 'dot' Directory Record to.
parent - The parent Directory Record for new Directory Record.
rock_ridge - The Rock Ridge version to use for this entry (if any).
xa - ... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L3694-L3711 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib._create_dotdot | def _create_dotdot(self, vd, parent, rock_ridge, relocated, xa, file_mode):
# type: (headervd.PrimaryOrSupplementaryVD, dr.DirectoryRecord, str, bool, bool, int) -> dr.DirectoryRecord
'''
An internal method to create a new 'dotdot' Directory Record.
Parameters:
vd - The volume ... | python | def _create_dotdot(self, vd, parent, rock_ridge, relocated, xa, file_mode):
# type: (headervd.PrimaryOrSupplementaryVD, dr.DirectoryRecord, str, bool, bool, int) -> dr.DirectoryRecord
'''
An internal method to create a new 'dotdot' Directory Record.
Parameters:
vd - The volume ... | An internal method to create a new 'dotdot' Directory Record.
Parameters:
vd - The volume descriptor to attach the 'dotdot' Directory Record to.
parent - The parent Directory Record for new Directory Record.
rock_ridge - The Rock Ridge version to use for this entry (if any).
... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L3713-L3732 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib.new | def new(self, interchange_level=1, sys_ident='', vol_ident='', set_size=1,
seqnum=1, log_block_size=2048, vol_set_ident=' ', pub_ident_str='',
preparer_ident_str='', app_ident_str='', copyright_file='',
abstract_file='', bibli_file='', vol_expire_date=None, app_use='',
jo... | python | def new(self, interchange_level=1, sys_ident='', vol_ident='', set_size=1,
seqnum=1, log_block_size=2048, vol_set_ident=' ', pub_ident_str='',
preparer_ident_str='', app_ident_str='', copyright_file='',
abstract_file='', bibli_file='', vol_expire_date=None, app_use='',
jo... | Create a new ISO from scratch.
Parameters:
interchange_level - The ISO9660 interchange level to use; this dictates
the rules on the names of files. Levels 1, 2, 3,
and 4 are supported. Level 1 is the most
conserva... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L3745-L4023 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib.open | def open(self, filename):
# type: (str) -> None
'''
Open up an existing ISO for inspection and modification.
Parameters:
filename - The filename containing the ISO to open up.
Returns:
Nothing.
'''
if self._initialized:
raise pycdlib... | python | def open(self, filename):
# type: (str) -> None
'''
Open up an existing ISO for inspection and modification.
Parameters:
filename - The filename containing the ISO to open up.
Returns:
Nothing.
'''
if self._initialized:
raise pycdlib... | Open up an existing ISO for inspection and modification.
Parameters:
filename - The filename containing the ISO to open up.
Returns:
Nothing. | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L4025-L4044 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib.open_fp | def open_fp(self, fp):
# type: (BinaryIO) -> None
'''
Open up an existing ISO for inspection and modification. Note that the
file object passed in here must stay open for the lifetime of this
object, as the PyCdlib class uses it internally to do writing and reading
opera... | python | def open_fp(self, fp):
# type: (BinaryIO) -> None
'''
Open up an existing ISO for inspection and modification. Note that the
file object passed in here must stay open for the lifetime of this
object, as the PyCdlib class uses it internally to do writing and reading
opera... | Open up an existing ISO for inspection and modification. Note that the
file object passed in here must stay open for the lifetime of this
object, as the PyCdlib class uses it internally to do writing and reading
operations. If you want PyCdlib to manage this for you, use 'open'
instead... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L4046-L4063 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib.get_file_from_iso | def get_file_from_iso(self, local_path, **kwargs):
# type: (str, Any) -> None
'''
A method to fetch a single file from the ISO and write it out
to a local file.
Parameters:
local_path - The local file to write to.
blocksize - The number of bytes in each transfe... | python | def get_file_from_iso(self, local_path, **kwargs):
# type: (str, Any) -> None
'''
A method to fetch a single file from the ISO and write it out
to a local file.
Parameters:
local_path - The local file to write to.
blocksize - The number of bytes in each transfe... | A method to fetch a single file from the ISO and write it out
to a local file.
Parameters:
local_path - The local file to write to.
blocksize - The number of bytes in each transfer.
iso_path - The absolute ISO9660 path to lookup on the ISO (exclusive
with ... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L4065-L4119 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib.get_file_from_iso_fp | def get_file_from_iso_fp(self, outfp, **kwargs):
# type: (BinaryIO, Any) -> None
'''
A method to fetch a single file from the ISO and write it out
to the file object.
Parameters:
outfp - The file object to write data to.
blocksize - The number of bytes in each ... | python | def get_file_from_iso_fp(self, outfp, **kwargs):
# type: (BinaryIO, Any) -> None
'''
A method to fetch a single file from the ISO and write it out
to the file object.
Parameters:
outfp - The file object to write data to.
blocksize - The number of bytes in each ... | A method to fetch a single file from the ISO and write it out
to the file object.
Parameters:
outfp - The file object to write data to.
blocksize - The number of bytes in each transfer.
iso_path - The absolute ISO9660 path to lookup on the ISO (exclusive
w... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L4121-L4174 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib.get_and_write | def get_and_write(self, iso_path, local_path, blocksize=8192):
# type: (str, str, int) -> None
'''
(deprecated) Fetch a single file from the ISO and write it out to the
specified file. Note that this will overwrite the contents of the local
file if it already exists. Also note ... | python | def get_and_write(self, iso_path, local_path, blocksize=8192):
# type: (str, str, int) -> None
'''
(deprecated) Fetch a single file from the ISO and write it out to the
specified file. Note that this will overwrite the contents of the local
file if it already exists. Also note ... | (deprecated) Fetch a single file from the ISO and write it out to the
specified file. Note that this will overwrite the contents of the local
file if it already exists. Also note that 'iso_path' must be an
absolute path to the file. Finally, the 'iso_path' can be an ISO9660
path, a Ro... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L4176-L4199 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib.get_and_write_fp | def get_and_write_fp(self, iso_path, outfp, blocksize=8192):
# type: (str, BinaryIO, int) -> None
'''
(deprecated) Fetch a single file from the ISO and write it out to the
file object. Note that 'iso_path' must be an absolute path to the file.
Also note that the 'iso_path' can b... | python | def get_and_write_fp(self, iso_path, outfp, blocksize=8192):
# type: (str, BinaryIO, int) -> None
'''
(deprecated) Fetch a single file from the ISO and write it out to the
file object. Note that 'iso_path' must be an absolute path to the file.
Also note that the 'iso_path' can b... | (deprecated) Fetch a single file from the ISO and write it out to the
file object. Note that 'iso_path' must be an absolute path to the file.
Also note that the 'iso_path' can be an ISO9660 path, a Rock Ridge path,
or a Joliet path. In the case of ambiguity, the Joliet path is tried
fi... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L4201-L4222 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib.write | def write(self, filename, blocksize=32768, progress_cb=None, progress_opaque=None):
# type: (str, int, Optional[Callable[[int, int, Any], None]], Optional[Any]) -> None
'''
Write a properly formatted ISO out to the filename passed in. This
also goes by the name of 'mastering'.
... | python | def write(self, filename, blocksize=32768, progress_cb=None, progress_opaque=None):
# type: (str, int, Optional[Callable[[int, int, Any], None]], Optional[Any]) -> None
'''
Write a properly formatted ISO out to the filename passed in. This
also goes by the name of 'mastering'.
... | Write a properly formatted ISO out to the filename passed in. This
also goes by the name of 'mastering'.
Parameters:
filename - The filename to write the data to.
blocksize - The blocksize to use when copying data; set to 32768 by default.
progress_cb - If not None, a functi... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L4224-L4244 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib.write_fp | def write_fp(self, outfp, blocksize=32768, progress_cb=None, progress_opaque=None):
# type: (BinaryIO, int, Optional[Callable[[int, int, Any], None]], Optional[Any]) -> None
'''
Write a properly formatted ISO out to the file object passed in. This
also goes by the name of 'mastering'.
... | python | def write_fp(self, outfp, blocksize=32768, progress_cb=None, progress_opaque=None):
# type: (BinaryIO, int, Optional[Callable[[int, int, Any], None]], Optional[Any]) -> None
'''
Write a properly formatted ISO out to the file object passed in. This
also goes by the name of 'mastering'.
... | Write a properly formatted ISO out to the file object passed in. This
also goes by the name of 'mastering'.
Parameters:
outfp - The file object to write the data to.
blocksize - The blocksize to use when copying data; set to 32768 by default.
progress_cb - If not None, a fun... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L4246-L4265 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib.add_fp | def add_fp(self, fp, length, iso_path, rr_name=None, joliet_path=None,
file_mode=None, udf_path=None):
# type: (BinaryIO, int, str, Optional[str], Optional[str], Optional[int], Optional[str]) -> None
'''
Add a file to the ISO. If the ISO is a Rock Ridge one, then a Rock
R... | python | def add_fp(self, fp, length, iso_path, rr_name=None, joliet_path=None,
file_mode=None, udf_path=None):
# type: (BinaryIO, int, str, Optional[str], Optional[str], Optional[int], Optional[str]) -> None
'''
Add a file to the ISO. If the ISO is a Rock Ridge one, then a Rock
R... | Add a file to the ISO. If the ISO is a Rock Ridge one, then a Rock
Ridge name must also be provided. If the ISO is a Joliet one, then a
Joliet path may also be provided; while it is optional to do so, it is
highly recommended. Note that the caller must ensure that 'fp' remains
open fo... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L4267-L4301 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib.add_file | def add_file(self, filename, iso_path, rr_name=None, joliet_path=None,
file_mode=None, udf_path=None):
# type: (Any, str, Optional[str], str, Optional[int], Optional[str]) -> None
'''
Add a file to the ISO. If the ISO is a Rock Ridge one, then a Rock
Ridge name must als... | python | def add_file(self, filename, iso_path, rr_name=None, joliet_path=None,
file_mode=None, udf_path=None):
# type: (Any, str, Optional[str], str, Optional[int], Optional[str]) -> None
'''
Add a file to the ISO. If the ISO is a Rock Ridge one, then a Rock
Ridge name must als... | Add a file to the ISO. If the ISO is a Rock Ridge one, then a Rock
Ridge name must also be provided. If the ISO is a Joliet one, then a
Joliet path may also be provided; while it is optional to do so, it is
highly recommended.
Parameters:
filename - The filename to use for th... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L4303-L4331 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib.modify_file_in_place | def modify_file_in_place(self, fp, length, iso_path, rr_name=None, # pylint: disable=unused-argument
joliet_path=None, udf_path=None): # pylint: disable=unused-argument
# type: (BinaryIO, int, str, Optional[str], Optional[str], Optional[str]) -> None
'''
An... | python | def modify_file_in_place(self, fp, length, iso_path, rr_name=None, # pylint: disable=unused-argument
joliet_path=None, udf_path=None): # pylint: disable=unused-argument
# type: (BinaryIO, int, str, Optional[str], Optional[str], Optional[str]) -> None
'''
An... | An API to modify a file in place on the ISO. This can be extremely fast
(much faster than calling the write method), but has many restrictions.
1. The original ISO file pointer must have been opened for reading
and writing.
2. Only an existing *file* can be modified; directories ... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L4333-L4457 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib.add_hard_link | def add_hard_link(self, **kwargs):
# type: (Any) -> None
'''
Add a hard link to the ISO. Hard links are alternate names for the
same file contents that don't take up any additional space on the the
ISO. This API can be used to create hard links between two files on
the ... | python | def add_hard_link(self, **kwargs):
# type: (Any) -> None
'''
Add a hard link to the ISO. Hard links are alternate names for the
same file contents that don't take up any additional space on the the
ISO. This API can be used to create hard links between two files on
the ... | Add a hard link to the ISO. Hard links are alternate names for the
same file contents that don't take up any additional space on the the
ISO. This API can be used to create hard links between two files on
the ISO9660 filesystem, between two files on the Joliet filesystem, or
between a ... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L4459-L4556 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib.rm_hard_link | def rm_hard_link(self, iso_path=None, joliet_path=None, udf_path=None):
# type: (Optional[str], Optional[str], Optional[str]) -> None
'''
Remove a hard link from the ISO. If the number of links to a piece of
data drops to zero, then the contents will be removed from the ISO.
Thu... | python | def rm_hard_link(self, iso_path=None, joliet_path=None, udf_path=None):
# type: (Optional[str], Optional[str], Optional[str]) -> None
'''
Remove a hard link from the ISO. If the number of links to a piece of
data drops to zero, then the contents will be removed from the ISO.
Thu... | Remove a hard link from the ISO. If the number of links to a piece of
data drops to zero, then the contents will be removed from the ISO.
Thus, this can be thought of as a lower-level interface to rm_file.
Either an ISO9660 path or a Joliet path must be passed to this API, but
not both.... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L4558-L4618 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib.add_directory | def add_directory(self, iso_path=None, rr_name=None, joliet_path=None,
file_mode=None, udf_path=None):
# type: (Optional[str], Optional[str], Optional[str], int, Optional[str]) -> None
'''
Add a directory to the ISO. At least one of an iso_path, joliet_path,
or udf... | python | def add_directory(self, iso_path=None, rr_name=None, joliet_path=None,
file_mode=None, udf_path=None):
# type: (Optional[str], Optional[str], Optional[str], int, Optional[str]) -> None
'''
Add a directory to the ISO. At least one of an iso_path, joliet_path,
or udf... | Add a directory to the ISO. At least one of an iso_path, joliet_path,
or udf_path must be provided. Providing joliet_path on a non-Joliet
ISO, or udf_path on a non-UDF ISO, is an error. If the ISO contains
Rock Ridge, then a Rock Ridge name must be provided.
Parameters:
iso_... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L4620-L4778 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib.rm_file | def rm_file(self, iso_path, rr_name=None, joliet_path=None, udf_path=None): # pylint: disable=unused-argument
# type: (str, Optional[str], Optional[str], Optional[str]) -> None
'''
Remove a file from the ISO.
Parameters:
iso_path - The path to the file to remove.
rr_n... | python | def rm_file(self, iso_path, rr_name=None, joliet_path=None, udf_path=None): # pylint: disable=unused-argument
# type: (str, Optional[str], Optional[str], Optional[str]) -> None
'''
Remove a file from the ISO.
Parameters:
iso_path - The path to the file to remove.
rr_n... | Remove a file from the ISO.
Parameters:
iso_path - The path to the file to remove.
rr_name - The Rock Ridge name of the file to remove.
joliet_path - The Joliet path to the file to remove.
udf_path - The UDF path to the file to remove.
Returns:
Nothing. | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L4797-L4883 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib.rm_directory | def rm_directory(self, iso_path=None, rr_name=None, joliet_path=None, udf_path=None):
# type: (Optional[str], Optional[str], Optional[str], Optional[str]) -> None
'''
Remove a directory from the ISO.
Parameters:
iso_path - The path to the directory to remove.
rr_name -... | python | def rm_directory(self, iso_path=None, rr_name=None, joliet_path=None, udf_path=None):
# type: (Optional[str], Optional[str], Optional[str], Optional[str]) -> None
'''
Remove a directory from the ISO.
Parameters:
iso_path - The path to the directory to remove.
rr_name -... | Remove a directory from the ISO.
Parameters:
iso_path - The path to the directory to remove.
rr_name - The Rock Ridge name of the directory to remove.
joliet_path - The Joliet path to the directory to remove.
udf_path - The UDF absolute path to the directory to remove.
... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L4885-L5005 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib.add_eltorito | def add_eltorito(self, bootfile_path, bootcatfile=None,
rr_bootcatname=None, joliet_bootcatfile=None,
boot_load_size=None, platform_id=0, boot_info_table=False,
efi=False, media_name='noemul', bootable=True,
boot_load_seg=0, udf_bootcat... | python | def add_eltorito(self, bootfile_path, bootcatfile=None,
rr_bootcatname=None, joliet_bootcatfile=None,
boot_load_size=None, platform_id=0, boot_info_table=False,
efi=False, media_name='noemul', bootable=True,
boot_load_seg=0, udf_bootcat... | Add an El Torito Boot Record, and associated files, to the ISO. The
file that will be used as the bootfile must be passed into this function
and must already be present on the ISO.
Parameters:
bootfile_path - The file to use as the boot file; it must already
e... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L5020-L5150 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib.rm_eltorito | def rm_eltorito(self):
# type: () -> None
'''
Remove the El Torito boot record (and Boot Catalog) from the ISO.
Parameters:
None.
Returns:
Nothing.
'''
if not self._initialized:
raise pycdlibexception.PyCdlibInvalidInput('This object... | python | def rm_eltorito(self):
# type: () -> None
'''
Remove the El Torito boot record (and Boot Catalog) from the ISO.
Parameters:
None.
Returns:
Nothing.
'''
if not self._initialized:
raise pycdlibexception.PyCdlibInvalidInput('This object... | Remove the El Torito boot record (and Boot Catalog) from the ISO.
Parameters:
None.
Returns:
Nothing. | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L5152-L5215 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib.add_symlink | def add_symlink(self, symlink_path, rr_symlink_name=None, rr_path=None,
joliet_path=None, udf_symlink_path=None, udf_target=None):
# type: (str, Optional[str], Optional[str], Optional[str], Optional[str], Optional[str]) -> None
'''
Add a symlink from rr_symlink_name to the rr... | python | def add_symlink(self, symlink_path, rr_symlink_name=None, rr_path=None,
joliet_path=None, udf_symlink_path=None, udf_target=None):
# type: (str, Optional[str], Optional[str], Optional[str], Optional[str], Optional[str]) -> None
'''
Add a symlink from rr_symlink_name to the rr... | Add a symlink from rr_symlink_name to the rr_path. The ISO must have
either Rock Ridge or UDF support (or both).
Parameters:
symlink_path - The ISO9660 name of the symlink itself on the ISO.
rr_symlink_name - The Rock Ridge name of the symlink itself on the ISO.
rr_path - Th... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L5217-L5385 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib.list_dir | def list_dir(self, iso_path, joliet=False):
# type: (str, bool) -> Generator
'''
(deprecated) Generate a list of all of the file/directory objects in the
specified location on the ISO. It is recommended to use the
'list_children' API instead.
Parameters:
iso_pa... | python | def list_dir(self, iso_path, joliet=False):
# type: (str, bool) -> Generator
'''
(deprecated) Generate a list of all of the file/directory objects in the
specified location on the ISO. It is recommended to use the
'list_children' API instead.
Parameters:
iso_pa... | (deprecated) Generate a list of all of the file/directory objects in the
specified location on the ISO. It is recommended to use the
'list_children' API instead.
Parameters:
iso_path - The path on the ISO to look up information for.
joliet - Whether to look for the path in th... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L5387-L5419 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib.list_children | def list_children(self, **kwargs):
# type: (str) -> Generator
'''
Generate a list of all of the file/directory objects in the
specified location on the ISO.
Parameters:
iso_path - The absolute path on the ISO to list the children for.
rr_path - The absolute Roc... | python | def list_children(self, **kwargs):
# type: (str) -> Generator
'''
Generate a list of all of the file/directory objects in the
specified location on the ISO.
Parameters:
iso_path - The absolute path on the ISO to list the children for.
rr_path - The absolute Roc... | Generate a list of all of the file/directory objects in the
specified location on the ISO.
Parameters:
iso_path - The absolute path on the ISO to list the children for.
rr_path - The absolute Rock Ridge path on the ISO to list the children for.
joliet_path - The absolute Joli... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L5421-L5468 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib.get_entry | def get_entry(self, iso_path, joliet=False):
# type: (str, bool) -> dr.DirectoryRecord
'''
(deprecated) Get the directory record for a particular path. It is
recommended to use the 'get_record' API instead.
Parameters:
iso_path - The path on the ISO to look up informat... | python | def get_entry(self, iso_path, joliet=False):
# type: (str, bool) -> dr.DirectoryRecord
'''
(deprecated) Get the directory record for a particular path. It is
recommended to use the 'get_record' API instead.
Parameters:
iso_path - The path on the ISO to look up informat... | (deprecated) Get the directory record for a particular path. It is
recommended to use the 'get_record' API instead.
Parameters:
iso_path - The path on the ISO to look up information for.
joliet - Whether to look for the path in the Joliet portion of the ISO.
Returns:
... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L5470-L5487 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib.get_record | def get_record(self, **kwargs):
# type: (str) -> Union[dr.DirectoryRecord, udfmod.UDFFileEntry]
'''
Get the directory record for a particular path.
Parameters:
iso_path - The absolute path on the ISO9660 filesystem to get the
record for.
rr_path - T... | python | def get_record(self, **kwargs):
# type: (str) -> Union[dr.DirectoryRecord, udfmod.UDFFileEntry]
'''
Get the directory record for a particular path.
Parameters:
iso_path - The absolute path on the ISO9660 filesystem to get the
record for.
rr_path - T... | Get the directory record for a particular path.
Parameters:
iso_path - The absolute path on the ISO9660 filesystem to get the
record for.
rr_path - The absolute path on the Rock Ridge filesystem to get the
record for.
joliet_path - The absolute ... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L5489-L5528 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib.add_isohybrid | def add_isohybrid(self, part_entry=1, mbr_id=None, part_offset=0,
geometry_sectors=32, geometry_heads=64, part_type=0x17,
mac=False):
# type: (int, Optional[int], int, int, int, int, bool) -> None
'''
Make an ISO a 'hybrid', which means that it can be ... | python | def add_isohybrid(self, part_entry=1, mbr_id=None, part_offset=0,
geometry_sectors=32, geometry_heads=64, part_type=0x17,
mac=False):
# type: (int, Optional[int], int, int, int, int, bool) -> None
'''
Make an ISO a 'hybrid', which means that it can be ... | Make an ISO a 'hybrid', which means that it can be booted either from a
CD or from more traditional media (like a USB stick). This requires
that the ISO already have El Torito, and will use the El Torito boot
file as a bootable image. That image must contain a certain signature
in orde... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L5530-L5574 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib.full_path_from_dirrecord | def full_path_from_dirrecord(self, rec, rockridge=False):
# type: (Union[dr.DirectoryRecord, udfmod.UDFFileEntry], bool) -> str
'''
A method to get the absolute path of a directory record.
Parameters:
rec - The directory record to get the full path for.
rockridge - Whe... | python | def full_path_from_dirrecord(self, rec, rockridge=False):
# type: (Union[dr.DirectoryRecord, udfmod.UDFFileEntry], bool) -> str
'''
A method to get the absolute path of a directory record.
Parameters:
rec - The directory record to get the full path for.
rockridge - Whe... | A method to get the absolute path of a directory record.
Parameters:
rec - The directory record to get the full path for.
rockridge - Whether to get the rock ridge full path.
Returns:
A string representing the absolute path to the file on the ISO. | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L5593-L5650 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib.duplicate_pvd | def duplicate_pvd(self):
# type: () -> None
'''
A method to add a duplicate PVD to the ISO. This is a mostly useless
feature allowed by Ecma-119 to have duplicate PVDs to avoid possible
corruption.
Parameters:
None.
Returns:
Nothing.
''... | python | def duplicate_pvd(self):
# type: () -> None
'''
A method to add a duplicate PVD to the ISO. This is a mostly useless
feature allowed by Ecma-119 to have duplicate PVDs to avoid possible
corruption.
Parameters:
None.
Returns:
Nothing.
''... | A method to add a duplicate PVD to the ISO. This is a mostly useless
feature allowed by Ecma-119 to have duplicate PVDs to avoid possible
corruption.
Parameters:
None.
Returns:
Nothing. | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L5652-L5671 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib.clear_hidden | def clear_hidden(self, iso_path=None, rr_path=None, joliet_path=None):
# type: (Optional[str], Optional[str], Optional[str]) -> None
'''
Clear the ISO9660 hidden attribute on a file or directory. This will
cause the file or directory to show up when listing entries on the ISO.
E... | python | def clear_hidden(self, iso_path=None, rr_path=None, joliet_path=None):
# type: (Optional[str], Optional[str], Optional[str]) -> None
'''
Clear the ISO9660 hidden attribute on a file or directory. This will
cause the file or directory to show up when listing entries on the ISO.
E... | Clear the ISO9660 hidden attribute on a file or directory. This will
cause the file or directory to show up when listing entries on the ISO.
Exactly one of iso_path, rr_path, or joliet_path must be specified.
Parameters:
iso_path - The path on the ISO to clear the hidden bit from.
... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L5703-L5731 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib.set_relocated_name | def set_relocated_name(self, name, rr_name):
# type: (str, str) -> None
'''
Set the name of the relocated directory on a Rock Ridge ISO. The ISO
must be a Rock Ridge one, and must not have previously had the relocated
name set.
Parameters:
name - The name for a... | python | def set_relocated_name(self, name, rr_name):
# type: (str, str) -> None
'''
Set the name of the relocated directory on a Rock Ridge ISO. The ISO
must be a Rock Ridge one, and must not have previously had the relocated
name set.
Parameters:
name - The name for a... | Set the name of the relocated directory on a Rock Ridge ISO. The ISO
must be a Rock Ridge one, and must not have previously had the relocated
name set.
Parameters:
name - The name for a relocated directory.
rr_name - The Rock Ridge name for a relocated directory.
Retu... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L5753-L5781 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib.walk | def walk(self, **kwargs):
# type: (str) -> Generator
'''
Walk the entries on the ISO, starting at the given path. One, and only
one, of iso_path, rr_path, joliet_path, and udf_path is allowed.
Similar to os.walk(), yield a 3-tuple of (path-to-here, dirlist, filelist)
for... | python | def walk(self, **kwargs):
# type: (str) -> Generator
'''
Walk the entries on the ISO, starting at the given path. One, and only
one, of iso_path, rr_path, joliet_path, and udf_path is allowed.
Similar to os.walk(), yield a 3-tuple of (path-to-here, dirlist, filelist)
for... | Walk the entries on the ISO, starting at the given path. One, and only
one, of iso_path, rr_path, joliet_path, and udf_path is allowed.
Similar to os.walk(), yield a 3-tuple of (path-to-here, dirlist, filelist)
for each directory level.
Parameters:
iso_path - The absolute ISO ... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L5783-L5880 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib.open_file_from_iso | def open_file_from_iso(self, **kwargs):
# type: (str) -> PyCdlibIO
'''
Open a file for reading in a context manager. This allows the user to
operate on the file in user-defined chunks (utilizing the read() method
of the returned context manager).
Parameters:
is... | python | def open_file_from_iso(self, **kwargs):
# type: (str) -> PyCdlibIO
'''
Open a file for reading in a context manager. This allows the user to
operate on the file in user-defined chunks (utilizing the read() method
of the returned context manager).
Parameters:
is... | Open a file for reading in a context manager. This allows the user to
operate on the file in user-defined chunks (utilizing the read() method
of the returned context manager).
Parameters:
iso_path - The absolute ISO path to the file on the ISO.
rr_path - The absolute Rock Rid... | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L5882-L5934 |
clalancette/pycdlib | pycdlib/pycdlib.py | PyCdlib.close | def close(self):
# type: () -> None
'''
Close the PyCdlib object, and re-initialize the object to the defaults.
The object can then be re-used for manipulation of another ISO.
Parameters:
None.
Returns:
Nothing.
'''
if not self._initiali... | python | def close(self):
# type: () -> None
'''
Close the PyCdlib object, and re-initialize the object to the defaults.
The object can then be re-used for manipulation of another ISO.
Parameters:
None.
Returns:
Nothing.
'''
if not self._initiali... | Close the PyCdlib object, and re-initialize the object to the defaults.
The object can then be re-used for manipulation of another ISO.
Parameters:
None.
Returns:
Nothing. | https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/pycdlib.py#L5936-L5954 |
sashahart/vex | vex/options.py | make_arg_parser | def make_arg_parser():
"""Return a standard ArgumentParser object.
"""
parser = argparse.ArgumentParser(
formatter_class=argparse.RawTextHelpFormatter,
usage="vex [OPTIONS] VIRTUALENV_NAME COMMAND_TO_RUN ...",
)
make = parser.add_argument_group(title='To make a new virtualenv')
... | python | def make_arg_parser():
"""Return a standard ArgumentParser object.
"""
parser = argparse.ArgumentParser(
formatter_class=argparse.RawTextHelpFormatter,
usage="vex [OPTIONS] VIRTUALENV_NAME COMMAND_TO_RUN ...",
)
make = parser.add_argument_group(title='To make a new virtualenv')
... | Return a standard ArgumentParser object. | https://github.com/sashahart/vex/blob/b7680c40897b8cbe6aae55ec9812b4fb11738192/vex/options.py#L5-L90 |
sashahart/vex | vex/options.py | get_options | def get_options(argv):
"""Called to parse the given list as command-line arguments.
:returns:
an options object as returned by argparse.
"""
arg_parser = make_arg_parser()
options, unknown = arg_parser.parse_known_args(argv)
if unknown:
arg_parser.print_help()
raise exce... | python | def get_options(argv):
"""Called to parse the given list as command-line arguments.
:returns:
an options object as returned by argparse.
"""
arg_parser = make_arg_parser()
options, unknown = arg_parser.parse_known_args(argv)
if unknown:
arg_parser.print_help()
raise exce... | Called to parse the given list as command-line arguments.
:returns:
an options object as returned by argparse. | https://github.com/sashahart/vex/blob/b7680c40897b8cbe6aae55ec9812b4fb11738192/vex/options.py#L94-L107 |
unixsurfer/anycast_healthchecker | anycast_healthchecker/healthchecker.py | HealthChecker._update_bird_conf_file | def _update_bird_conf_file(self, operation):
"""Update BIRD configuration.
It adds to or removes IP prefix from BIRD configuration. It also
updates generation time stamp in the configuration file.
Main program will exit if configuration file cant be read/written.
Arguments:
... | python | def _update_bird_conf_file(self, operation):
"""Update BIRD configuration.
It adds to or removes IP prefix from BIRD configuration. It also
updates generation time stamp in the configuration file.
Main program will exit if configuration file cant be read/written.
Arguments:
... | Update BIRD configuration.
It adds to or removes IP prefix from BIRD configuration. It also
updates generation time stamp in the configuration file.
Main program will exit if configuration file cant be read/written.
Arguments:
operation (obj): Either an AddOperation or Del... | https://github.com/unixsurfer/anycast_healthchecker/blob/3ab9c1d65d550eb30621ced2434252f61d1fdd33/anycast_healthchecker/healthchecker.py#L78-L174 |
unixsurfer/anycast_healthchecker | anycast_healthchecker/healthchecker.py | HealthChecker.run | def run(self):
"""Lunch checks and triggers updates on BIRD configuration."""
# Lunch a thread for each configuration
if not self.services:
self.log.warning("no service checks are configured")
else:
self.log.info("going to lunch %s threads", len(self.services))
... | python | def run(self):
"""Lunch checks and triggers updates on BIRD configuration."""
# Lunch a thread for each configuration
if not self.services:
self.log.warning("no service checks are configured")
else:
self.log.info("going to lunch %s threads", len(self.services))
... | Lunch checks and triggers updates on BIRD configuration. | https://github.com/unixsurfer/anycast_healthchecker/blob/3ab9c1d65d550eb30621ced2434252f61d1fdd33/anycast_healthchecker/healthchecker.py#L176-L228 |
unixsurfer/anycast_healthchecker | anycast_healthchecker/utils.py | valid_ip_prefix | def valid_ip_prefix(ip_prefix):
"""Perform a sanity check on ip_prefix.
Arguments:
ip_prefix (str): The IP-Prefix to validate
Returns:
True if ip_prefix is a valid IPv4 address with prefix length 32 or a
valid IPv6 address with prefix length 128, otherwise False
"""
try:
... | python | def valid_ip_prefix(ip_prefix):
"""Perform a sanity check on ip_prefix.
Arguments:
ip_prefix (str): The IP-Prefix to validate
Returns:
True if ip_prefix is a valid IPv4 address with prefix length 32 or a
valid IPv6 address with prefix length 128, otherwise False
"""
try:
... | Perform a sanity check on ip_prefix.
Arguments:
ip_prefix (str): The IP-Prefix to validate
Returns:
True if ip_prefix is a valid IPv4 address with prefix length 32 or a
valid IPv6 address with prefix length 128, otherwise False | https://github.com/unixsurfer/anycast_healthchecker/blob/3ab9c1d65d550eb30621ced2434252f61d1fdd33/anycast_healthchecker/utils.py#L82-L102 |
unixsurfer/anycast_healthchecker | anycast_healthchecker/utils.py | get_ip_prefixes_from_config | def get_ip_prefixes_from_config(config, services, ip_version):
"""Build a set of IP prefixes found in service configuration files.
Arguments:
config (obg): A configparser object which holds our configuration.
services (list): A list of section names which are the name of the
service che... | python | def get_ip_prefixes_from_config(config, services, ip_version):
"""Build a set of IP prefixes found in service configuration files.
Arguments:
config (obg): A configparser object which holds our configuration.
services (list): A list of section names which are the name of the
service che... | Build a set of IP prefixes found in service configuration files.
Arguments:
config (obg): A configparser object which holds our configuration.
services (list): A list of section names which are the name of the
service checks.
ip_version (int): IP protocol version
Returns:
... | https://github.com/unixsurfer/anycast_healthchecker/blob/3ab9c1d65d550eb30621ced2434252f61d1fdd33/anycast_healthchecker/utils.py#L125-L145 |
unixsurfer/anycast_healthchecker | anycast_healthchecker/utils.py | ip_prefixes_sanity_check | def ip_prefixes_sanity_check(config, bird_configuration):
"""Sanity check on IP prefixes.
Arguments:
config (obg): A configparser object which holds our configuration.
bird_configuration (dict): A dictionary, which holds Bird configuration
per IP protocol version.
"""
for ip_ve... | python | def ip_prefixes_sanity_check(config, bird_configuration):
"""Sanity check on IP prefixes.
Arguments:
config (obg): A configparser object which holds our configuration.
bird_configuration (dict): A dictionary, which holds Bird configuration
per IP protocol version.
"""
for ip_ve... | Sanity check on IP prefixes.
Arguments:
config (obg): A configparser object which holds our configuration.
bird_configuration (dict): A dictionary, which holds Bird configuration
per IP protocol version. | https://github.com/unixsurfer/anycast_healthchecker/blob/3ab9c1d65d550eb30621ced2434252f61d1fdd33/anycast_healthchecker/utils.py#L148-L165 |
unixsurfer/anycast_healthchecker | anycast_healthchecker/utils.py | modify_ip_prefixes | def modify_ip_prefixes(
config,
config_file,
variable_name,
dummy_ip_prefix,
reconfigure_cmd,
keep_changes,
changes_counter,
ip_version):
"""Modify IP prefixes in Bird configuration.
Depending on the configuration either removes or reports IP pref... | python | def modify_ip_prefixes(
config,
config_file,
variable_name,
dummy_ip_prefix,
reconfigure_cmd,
keep_changes,
changes_counter,
ip_version):
"""Modify IP prefixes in Bird configuration.
Depending on the configuration either removes or reports IP pref... | Modify IP prefixes in Bird configuration.
Depending on the configuration either removes or reports IP prefixes found
in Bird configuration for which we don't have a service check associated
with them. Moreover, it adds the dummy IP prefix if it isn't present and
ensures that the correct variable name i... | https://github.com/unixsurfer/anycast_healthchecker/blob/3ab9c1d65d550eb30621ced2434252f61d1fdd33/anycast_healthchecker/utils.py#L168-L268 |
unixsurfer/anycast_healthchecker | anycast_healthchecker/utils.py | load_configuration | def load_configuration(config_file, config_dir, service_file):
"""Build configuration objects.
If all sanity checks against daemon and service check settings are passed
then it builds a ConfigParser object which holds all our configuration
and a dictionary data structure which holds Bird configuration ... | python | def load_configuration(config_file, config_dir, service_file):
"""Build configuration objects.
If all sanity checks against daemon and service check settings are passed
then it builds a ConfigParser object which holds all our configuration
and a dictionary data structure which holds Bird configuration ... | Build configuration objects.
If all sanity checks against daemon and service check settings are passed
then it builds a ConfigParser object which holds all our configuration
and a dictionary data structure which holds Bird configuration per IP
protocol version.
Arguments:
config_file (str)... | https://github.com/unixsurfer/anycast_healthchecker/blob/3ab9c1d65d550eb30621ced2434252f61d1fdd33/anycast_healthchecker/utils.py#L271-L323 |
unixsurfer/anycast_healthchecker | anycast_healthchecker/utils.py | configuration_check | def configuration_check(config):
"""Perform a sanity check on configuration.
First it performs a sanity check against settings for daemon
and then against settings for each service check.
Arguments:
config (obj): A configparser object which holds our configuration.
Returns:
None i... | python | def configuration_check(config):
"""Perform a sanity check on configuration.
First it performs a sanity check against settings for daemon
and then against settings for each service check.
Arguments:
config (obj): A configparser object which holds our configuration.
Returns:
None i... | Perform a sanity check on configuration.
First it performs a sanity check against settings for daemon
and then against settings for each service check.
Arguments:
config (obj): A configparser object which holds our configuration.
Returns:
None if all checks are successfully passed oth... | https://github.com/unixsurfer/anycast_healthchecker/blob/3ab9c1d65d550eb30621ced2434252f61d1fdd33/anycast_healthchecker/utils.py#L326-L372 |
unixsurfer/anycast_healthchecker | anycast_healthchecker/utils.py | service_configuration_check | def service_configuration_check(config):
"""Perform a sanity check against options for each service check.
Arguments:
config (obj): A configparser object which holds our configuration.
Returns:
None if all sanity checks are successfully passed otherwise raises a
ValueError exceptio... | python | def service_configuration_check(config):
"""Perform a sanity check against options for each service check.
Arguments:
config (obj): A configparser object which holds our configuration.
Returns:
None if all sanity checks are successfully passed otherwise raises a
ValueError exceptio... | Perform a sanity check against options for each service check.
Arguments:
config (obj): A configparser object which holds our configuration.
Returns:
None if all sanity checks are successfully passed otherwise raises a
ValueError exception. | https://github.com/unixsurfer/anycast_healthchecker/blob/3ab9c1d65d550eb30621ced2434252f61d1fdd33/anycast_healthchecker/utils.py#L375-L454 |
unixsurfer/anycast_healthchecker | anycast_healthchecker/utils.py | build_bird_configuration | def build_bird_configuration(config):
"""Build bird configuration structure.
First it performs a sanity check against bird settings and then builds a
dictionary structure with bird configuration per IP version.
Arguments:
config (obj): A configparser object which holds our configuration.
... | python | def build_bird_configuration(config):
"""Build bird configuration structure.
First it performs a sanity check against bird settings and then builds a
dictionary structure with bird configuration per IP version.
Arguments:
config (obj): A configparser object which holds our configuration.
... | Build bird configuration structure.
First it performs a sanity check against bird settings and then builds a
dictionary structure with bird configuration per IP version.
Arguments:
config (obj): A configparser object which holds our configuration.
Returns:
A dictionary
Raises:
... | https://github.com/unixsurfer/anycast_healthchecker/blob/3ab9c1d65d550eb30621ced2434252f61d1fdd33/anycast_healthchecker/utils.py#L457-L519 |
unixsurfer/anycast_healthchecker | anycast_healthchecker/utils.py | get_variable_name_from_bird | def get_variable_name_from_bird(bird_conf):
"""Return the variable name set in Bird configuration.
The variable name in Bird configuration is set with the keyword 'define',
here is an example:
define ACAST_PS_ADVERTISE =
and we exract the string between the word 'define' and the equals sign.
... | python | def get_variable_name_from_bird(bird_conf):
"""Return the variable name set in Bird configuration.
The variable name in Bird configuration is set with the keyword 'define',
here is an example:
define ACAST_PS_ADVERTISE =
and we exract the string between the word 'define' and the equals sign.
... | Return the variable name set in Bird configuration.
The variable name in Bird configuration is set with the keyword 'define',
here is an example:
define ACAST_PS_ADVERTISE =
and we exract the string between the word 'define' and the equals sign.
Arguments:
bird_conf (str): The absolu... | https://github.com/unixsurfer/anycast_healthchecker/blob/3ab9c1d65d550eb30621ced2434252f61d1fdd33/anycast_healthchecker/utils.py#L522-L555 |
unixsurfer/anycast_healthchecker | anycast_healthchecker/utils.py | create_bird_config_files | def create_bird_config_files(bird_configuration):
"""Create bird configuration files per IP version.
Creates bird configuration files if they don't exist. It also creates the
directories where we store the history of changes, if this functionality is
enabled.
Arguments:
bird_configuration ... | python | def create_bird_config_files(bird_configuration):
"""Create bird configuration files per IP version.
Creates bird configuration files if they don't exist. It also creates the
directories where we store the history of changes, if this functionality is
enabled.
Arguments:
bird_configuration ... | Create bird configuration files per IP version.
Creates bird configuration files if they don't exist. It also creates the
directories where we store the history of changes, if this functionality is
enabled.
Arguments:
bird_configuration (dict): A dictionary with settings for bird.
Returns... | https://github.com/unixsurfer/anycast_healthchecker/blob/3ab9c1d65d550eb30621ced2434252f61d1fdd33/anycast_healthchecker/utils.py#L558-L595 |
unixsurfer/anycast_healthchecker | anycast_healthchecker/utils.py | running | def running(processid):
"""Check the validity of a process ID.
Arguments:
processid (int): Process ID number.
Returns:
True if process ID is found otherwise False.
"""
try:
# From kill(2)
# If sig is 0 (the null signal), error checking is performed but no
... | python | def running(processid):
"""Check the validity of a process ID.
Arguments:
processid (int): Process ID number.
Returns:
True if process ID is found otherwise False.
"""
try:
# From kill(2)
# If sig is 0 (the null signal), error checking is performed but no
... | Check the validity of a process ID.
Arguments:
processid (int): Process ID number.
Returns:
True if process ID is found otherwise False. | https://github.com/unixsurfer/anycast_healthchecker/blob/3ab9c1d65d550eb30621ced2434252f61d1fdd33/anycast_healthchecker/utils.py#L598-L621 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.