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_code_tokens
listlengths
15
672k
func_documentation_string
stringlengths
1
47.2k
func_documentation_tokens
listlengths
1
3.92k
split_name
stringclasses
1 value
func_code_url
stringlengths
85
339
clalancette/pycdlib
pycdlib/rockridge.py
RRPNRecord.record
def record(self): # type: () -> bytes ''' Generate a string representing the Rock Ridge POSIX Device Number record. Parameters: None. Returns: String containing the Rock Ridge record. ''' if not self._initialized: raise pycdl...
python
def record(self): # type: () -> bytes ''' Generate a string representing the Rock Ridge POSIX Device Number record. Parameters: None. Returns: String containing the Rock Ridge record. ''' if not self._initialized: raise pycdl...
[ "def", "record", "(", "self", ")", ":", "# type: () -> bytes", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'PN record not yet initialized!'", ")", "return", "b'PN'", "+", "struct", ".", "pack", "("...
Generate a string representing the Rock Ridge POSIX Device Number record. Parameters: None. Returns: String containing the Rock Ridge record.
[ "Generate", "a", "string", "representing", "the", "Rock", "Ridge", "POSIX", "Device", "Number", "record", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L800-L814
clalancette/pycdlib
pycdlib/rockridge.py
RRSLRecord.parse
def parse(self, rrstr): # type: (bytes) -> None ''' Parse a Rock Ridge Symbolic Link record out of a string. Parameters: rrstr - The string to parse the record out of. Returns: Nothing. ''' if self._initialized: raise pycdlibexceptio...
python
def parse(self, rrstr): # type: (bytes) -> None ''' Parse a Rock Ridge Symbolic Link record out of a string. Parameters: rrstr - The string to parse the record out of. Returns: Nothing. ''' if self._initialized: raise pycdlibexceptio...
[ "def", "parse", "(", "self", ",", "rrstr", ")", ":", "# type: (bytes) -> None", "if", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'SL record already initialized!'", ")", "(", "su_len", ",", "su_entry_version_unused...
Parse a Rock Ridge Symbolic Link record out of a string. Parameters: rrstr - The string to parse the record out of. Returns: Nothing.
[ "Parse", "a", "Rock", "Ridge", "Symbolic", "Link", "record", "out", "of", "a", "string", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L993-L1029
clalancette/pycdlib
pycdlib/rockridge.py
RRSLRecord.add_component
def add_component(self, symlink_comp): # type: (bytes) -> None ''' Add a new component to this symlink record. Parameters: symlink_comp - The string to add to this symlink record. Returns: Nothing. ''' if not self._initialized: raise...
python
def add_component(self, symlink_comp): # type: (bytes) -> None ''' Add a new component to this symlink record. Parameters: symlink_comp - The string to add to this symlink record. Returns: Nothing. ''' if not self._initialized: raise...
[ "def", "add_component", "(", "self", ",", "symlink_comp", ")", ":", "# type: (bytes) -> None", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'SL record not yet initialized!'", ")", "if", "(", "self", "...
Add a new component to this symlink record. Parameters: symlink_comp - The string to add to this symlink record. Returns: Nothing.
[ "Add", "a", "new", "component", "to", "this", "symlink", "record", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L1046-L1062
clalancette/pycdlib
pycdlib/rockridge.py
RRSLRecord.current_length
def current_length(self): # type: () -> int ''' Calculate the current length of this symlink record. Parameters: None. Returns: Length of this symlink record. ''' if not self._initialized: raise pycdlibexception.PyCdlibInternalError(...
python
def current_length(self): # type: () -> int ''' Calculate the current length of this symlink record. Parameters: None. Returns: Length of this symlink record. ''' if not self._initialized: raise pycdlibexception.PyCdlibInternalError(...
[ "def", "current_length", "(", "self", ")", ":", "# type: () -> int", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'SL record not yet initialized!'", ")", "strlist", "=", "[", "]", "for", "comp", "in...
Calculate the current length of this symlink record. Parameters: None. Returns: Length of this symlink record.
[ "Calculate", "the", "current", "length", "of", "this", "symlink", "record", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L1064-L1081
clalancette/pycdlib
pycdlib/rockridge.py
RRSLRecord.record
def record(self): # type: () -> bytes ''' Generate a string representing the Rock Ridge Symbolic Link record. Parameters: None. Returns: String containing the Rock Ridge record. ''' if not self._initialized: raise pycdlibexception.Py...
python
def record(self): # type: () -> bytes ''' Generate a string representing the Rock Ridge Symbolic Link record. Parameters: None. Returns: String containing the Rock Ridge record. ''' if not self._initialized: raise pycdlibexception.Py...
[ "def", "record", "(", "self", ")", ":", "# type: () -> bytes", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'SL record not yet initialized!'", ")", "outlist", "=", "[", "b'SL'", ",", "struct", ".", ...
Generate a string representing the Rock Ridge Symbolic Link record. Parameters: None. Returns: String containing the Rock Ridge record.
[ "Generate", "a", "string", "representing", "the", "Rock", "Ridge", "Symbolic", "Link", "record", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L1083-L1100
clalancette/pycdlib
pycdlib/rockridge.py
RRSLRecord.name
def name(self): # type: () -> bytes ''' Generate a string that contains all components of the symlink. Parameters: None Returns: String containing all components of the symlink. ''' if not self._initialized: raise pycdlibexception.Py...
python
def name(self): # type: () -> bytes ''' Generate a string that contains all components of the symlink. Parameters: None Returns: String containing all components of the symlink. ''' if not self._initialized: raise pycdlibexception.Py...
[ "def", "name", "(", "self", ")", ":", "# type: () -> bytes", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'SL record not yet initialized!'", ")", "outlist", "=", "[", "]", "# type: List[bytes]", "cont...
Generate a string that contains all components of the symlink. Parameters: None Returns: String containing all components of the symlink.
[ "Generate", "a", "string", "that", "contains", "all", "components", "of", "the", "symlink", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L1102-L1131
clalancette/pycdlib
pycdlib/rockridge.py
RRSLRecord.set_last_component_continued
def set_last_component_continued(self): # type: () -> None ''' Set the previous component of this SL record to continued. Parameters: None. Returns: Nothing. ''' if not self._initialized: raise pycdlibexception.PyCdlibInternalError('...
python
def set_last_component_continued(self): # type: () -> None ''' Set the previous component of this SL record to continued. Parameters: None. Returns: Nothing. ''' if not self._initialized: raise pycdlibexception.PyCdlibInternalError('...
[ "def", "set_last_component_continued", "(", "self", ")", ":", "# type: () -> None", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'SL record not yet initialized!'", ")", "if", "not", "self", ".", "symlin...
Set the previous component of this SL record to continued. Parameters: None. Returns: Nothing.
[ "Set", "the", "previous", "component", "of", "this", "SL", "record", "to", "continued", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L1148-L1164
clalancette/pycdlib
pycdlib/rockridge.py
RRSLRecord.last_component_continued
def last_component_continued(self): # type: () -> bool ''' Determines whether the previous component of this SL record is a continued one or not. Parameters: None. Returns: True if the previous component of this SL record is continued, False otherwise. ...
python
def last_component_continued(self): # type: () -> bool ''' Determines whether the previous component of this SL record is a continued one or not. Parameters: None. Returns: True if the previous component of this SL record is continued, False otherwise. ...
[ "def", "last_component_continued", "(", "self", ")", ":", "# type: () -> bool", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'SL record not yet initialized!'", ")", "if", "not", "self", ".", "symlink_co...
Determines whether the previous component of this SL record is a continued one or not. Parameters: None. Returns: True if the previous component of this SL record is continued, False otherwise.
[ "Determines", "whether", "the", "previous", "component", "of", "this", "SL", "record", "is", "a", "continued", "one", "or", "not", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L1166-L1183
clalancette/pycdlib
pycdlib/rockridge.py
RRSLRecord.length
def length(symlink_components): # type: (List[bytes]) -> int ''' Static method to return the length of the Rock Ridge Symbolic Link record. Parameters: symlink_components - A list containing a string for each of the symbolic link components...
python
def length(symlink_components): # type: (List[bytes]) -> int ''' Static method to return the length of the Rock Ridge Symbolic Link record. Parameters: symlink_components - A list containing a string for each of the symbolic link components...
[ "def", "length", "(", "symlink_components", ")", ":", "# type: (List[bytes]) -> int", "length", "=", "RRSLRecord", ".", "header_length", "(", ")", "for", "comp", "in", "symlink_components", ":", "length", "+=", "RRSLRecord", ".", "Component", ".", "length", "(", ...
Static method to return the length of the Rock Ridge Symbolic Link record. Parameters: symlink_components - A list containing a string for each of the symbolic link components. Returns: The length of this record in bytes.
[ "Static", "method", "to", "return", "the", "length", "of", "the", "Rock", "Ridge", "Symbolic", "Link", "record", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L1209-L1224
clalancette/pycdlib
pycdlib/rockridge.py
RRNMRecord.parse
def parse(self, rrstr): # type: (bytes) -> None ''' Parse a Rock Ridge Alternate Name record out of a string. Parameters: rrstr - The string to parse the record out of. Returns: Nothing. ''' if self._initialized: raise pycdlibexcepti...
python
def parse(self, rrstr): # type: (bytes) -> None ''' Parse a Rock Ridge Alternate Name record out of a string. Parameters: rrstr - The string to parse the record out of. Returns: Nothing. ''' if self._initialized: raise pycdlibexcepti...
[ "def", "parse", "(", "self", ",", "rrstr", ")", ":", "# type: (bytes) -> None", "if", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'NM record already initialized!'", ")", "(", "su_len", ",", "su_entry_version_unused...
Parse a Rock Ridge Alternate Name record out of a string. Parameters: rrstr - The string to parse the record out of. Returns: Nothing.
[ "Parse", "a", "Rock", "Ridge", "Alternate", "Name", "record", "out", "of", "a", "string", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L1239-L1266
clalancette/pycdlib
pycdlib/rockridge.py
RRNMRecord.new
def new(self, rr_name): # type: (bytes) -> None ''' Create a new Rock Ridge Alternate Name record. Parameters: rr_name - The name for the new record. Returns: Nothing. ''' if self._initialized: raise pycdlibexception.PyCdlibInternalE...
python
def new(self, rr_name): # type: (bytes) -> None ''' Create a new Rock Ridge Alternate Name record. Parameters: rr_name - The name for the new record. Returns: Nothing. ''' if self._initialized: raise pycdlibexception.PyCdlibInternalE...
[ "def", "new", "(", "self", ",", "rr_name", ")", ":", "# type: (bytes) -> None", "if", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'NM record already initialized!'", ")", "self", ".", "posix_name", "=", "rr_name",...
Create a new Rock Ridge Alternate Name record. Parameters: rr_name - The name for the new record. Returns: Nothing.
[ "Create", "a", "new", "Rock", "Ridge", "Alternate", "Name", "record", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L1268-L1284
clalancette/pycdlib
pycdlib/rockridge.py
RRNMRecord.record
def record(self): # type: () -> bytes ''' Generate a string representing the Rock Ridge Alternate Name record. Parameters: None. Returns: String containing the Rock Ridge record. ''' if not self._initialized: raise pycdlibexception.P...
python
def record(self): # type: () -> bytes ''' Generate a string representing the Rock Ridge Alternate Name record. Parameters: None. Returns: String containing the Rock Ridge record. ''' if not self._initialized: raise pycdlibexception.P...
[ "def", "record", "(", "self", ")", ":", "# type: () -> bytes", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'NM record not yet initialized!'", ")", "return", "b'NM'", "+", "struct", ".", "pack", "("...
Generate a string representing the Rock Ridge Alternate Name record. Parameters: None. Returns: String containing the Rock Ridge record.
[ "Generate", "a", "string", "representing", "the", "Rock", "Ridge", "Alternate", "Name", "record", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L1286-L1299
clalancette/pycdlib
pycdlib/rockridge.py
RRCLRecord.parse
def parse(self, rrstr): # type: (bytes) -> None ''' Parse a Rock Ridge Child Link record out of a string. Parameters: rrstr - The string to parse the record out of. Returns: Nothing. ''' if self._initialized: raise pycdlibexception.P...
python
def parse(self, rrstr): # type: (bytes) -> None ''' Parse a Rock Ridge Child Link record out of a string. Parameters: rrstr - The string to parse the record out of. Returns: Nothing. ''' if self._initialized: raise pycdlibexception.P...
[ "def", "parse", "(", "self", ",", "rrstr", ")", ":", "# type: (bytes) -> None", "if", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'CL record already initialized!'", ")", "# We assume that the caller has already checked t...
Parse a Rock Ridge Child Link record out of a string. Parameters: rrstr - The string to parse the record out of. Returns: Nothing.
[ "Parse", "a", "Rock", "Ridge", "Child", "Link", "record", "out", "of", "a", "string", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L1344-L1368
clalancette/pycdlib
pycdlib/rockridge.py
RRCLRecord.new
def new(self): # type: () -> None ''' Create a new Rock Ridge Child Link record. Parameters: None. Returns: Nothing. ''' if self._initialized: raise pycdlibexception.PyCdlibInternalError('CL record already initialized!') sel...
python
def new(self): # type: () -> None ''' Create a new Rock Ridge Child Link record. Parameters: None. Returns: Nothing. ''' if self._initialized: raise pycdlibexception.PyCdlibInternalError('CL record already initialized!') sel...
[ "def", "new", "(", "self", ")", ":", "# type: () -> None", "if", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'CL record already initialized!'", ")", "self", ".", "child_log_block_num", "=", "0", "# This gets set la...
Create a new Rock Ridge Child Link record. Parameters: None. Returns: Nothing.
[ "Create", "a", "new", "Rock", "Ridge", "Child", "Link", "record", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L1370-L1385
clalancette/pycdlib
pycdlib/rockridge.py
RRCLRecord.record
def record(self): # type: () -> bytes ''' Generate a string representing the Rock Ridge Child Link record. Parameters: None. Returns: String containing the Rock Ridge record. ''' if not self._initialized: raise pycdlibexception.PyCdl...
python
def record(self): # type: () -> bytes ''' Generate a string representing the Rock Ridge Child Link record. Parameters: None. Returns: String containing the Rock Ridge record. ''' if not self._initialized: raise pycdlibexception.PyCdl...
[ "def", "record", "(", "self", ")", ":", "# type: () -> bytes", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'CL record not yet initialized!'", ")", "return", "b'CL'", "+", "struct", ".", "pack", "("...
Generate a string representing the Rock Ridge Child Link record. Parameters: None. Returns: String containing the Rock Ridge record.
[ "Generate", "a", "string", "representing", "the", "Rock", "Ridge", "Child", "Link", "record", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L1387-L1400
clalancette/pycdlib
pycdlib/rockridge.py
RRCLRecord.set_log_block_num
def set_log_block_num(self, bl): # type: (int) -> None ''' Set the logical block number for the child. Parameters: bl - Logical block number of the child. Returns: Nothing. ''' if not self._initialized: raise pycdlibexception.PyCdlib...
python
def set_log_block_num(self, bl): # type: (int) -> None ''' Set the logical block number for the child. Parameters: bl - Logical block number of the child. Returns: Nothing. ''' if not self._initialized: raise pycdlibexception.PyCdlib...
[ "def", "set_log_block_num", "(", "self", ",", "bl", ")", ":", "# type: (int) -> None", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'CL record not yet initialized!'", ")", "self", ".", "child_log_block_...
Set the logical block number for the child. Parameters: bl - Logical block number of the child. Returns: Nothing.
[ "Set", "the", "logical", "block", "number", "for", "the", "child", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L1402-L1415
clalancette/pycdlib
pycdlib/rockridge.py
RRPLRecord.parse
def parse(self, rrstr): # type: (bytes) -> None ''' Parse a Rock Ridge Parent Link record out of a string. Parameters: rrstr - The string to parse the record out of. Returns: Nothing. ''' if self._initialized: raise pycdlibexception....
python
def parse(self, rrstr): # type: (bytes) -> None ''' Parse a Rock Ridge Parent Link record out of a string. Parameters: rrstr - The string to parse the record out of. Returns: Nothing. ''' if self._initialized: raise pycdlibexception....
[ "def", "parse", "(", "self", ",", "rrstr", ")", ":", "# type: (bytes) -> None", "if", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'PL record already initialized!'", ")", "# We assume that the caller has already checked t...
Parse a Rock Ridge Parent Link record out of a string. Parameters: rrstr - The string to parse the record out of. Returns: Nothing.
[ "Parse", "a", "Rock", "Ridge", "Parent", "Link", "record", "out", "of", "a", "string", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L1445-L1468
clalancette/pycdlib
pycdlib/rockridge.py
RRPLRecord.new
def new(self): # type: () -> None ''' Generate a string representing the Rock Ridge Parent Link record. Parameters: None. Returns: String containing the Rock Ridge record. ''' if self._initialized: raise pycdlibexception.PyCdlibInter...
python
def new(self): # type: () -> None ''' Generate a string representing the Rock Ridge Parent Link record. Parameters: None. Returns: String containing the Rock Ridge record. ''' if self._initialized: raise pycdlibexception.PyCdlibInter...
[ "def", "new", "(", "self", ")", ":", "# type: () -> None", "if", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'PL record already initialized!'", ")", "self", ".", "parent_log_block_num", "=", "0", "# This will get s...
Generate a string representing the Rock Ridge Parent Link record. Parameters: None. Returns: String containing the Rock Ridge record.
[ "Generate", "a", "string", "representing", "the", "Rock", "Ridge", "Parent", "Link", "record", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L1470-L1485
clalancette/pycdlib
pycdlib/rockridge.py
RRPLRecord.record
def record(self): # type: () -> bytes ''' Generate a string representing the Rock Ridge Child Link record. Parameters: None. Returns: String containing the Rock Ridge record. ''' if not self._initialized: raise pycdlibexception.PyCdl...
python
def record(self): # type: () -> bytes ''' Generate a string representing the Rock Ridge Child Link record. Parameters: None. Returns: String containing the Rock Ridge record. ''' if not self._initialized: raise pycdlibexception.PyCdl...
[ "def", "record", "(", "self", ")", ":", "# type: () -> bytes", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'PL record not yet initialized!'", ")", "return", "b'PL'", "+", "struct", ".", "pack", "("...
Generate a string representing the Rock Ridge Child Link record. Parameters: None. Returns: String containing the Rock Ridge record.
[ "Generate", "a", "string", "representing", "the", "Rock", "Ridge", "Child", "Link", "record", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L1487-L1500
clalancette/pycdlib
pycdlib/rockridge.py
RRPLRecord.set_log_block_num
def set_log_block_num(self, bl): # type: (int) -> None ''' Set the logical block number for the parent. Parameters: bl - Logical block number of the parent. Returns: Nothing. ''' if not self._initialized: raise pycdlibexception.PyCdl...
python
def set_log_block_num(self, bl): # type: (int) -> None ''' Set the logical block number for the parent. Parameters: bl - Logical block number of the parent. Returns: Nothing. ''' if not self._initialized: raise pycdlibexception.PyCdl...
[ "def", "set_log_block_num", "(", "self", ",", "bl", ")", ":", "# type: (int) -> None", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'PL record not yet initialized!'", ")", "self", ".", "parent_log_block...
Set the logical block number for the parent. Parameters: bl - Logical block number of the parent. Returns: Nothing.
[ "Set", "the", "logical", "block", "number", "for", "the", "parent", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L1502-L1515
clalancette/pycdlib
pycdlib/rockridge.py
RRTFRecord.parse
def parse(self, rrstr): # type: (bytes) -> None ''' Parse a Rock Ridge Time Stamp record out of a string. Parameters: rrstr - The string to parse the record out of. Returns: Nothing. ''' if self._initialized: raise pycdlibexception.P...
python
def parse(self, rrstr): # type: (bytes) -> None ''' Parse a Rock Ridge Time Stamp record out of a string. Parameters: rrstr - The string to parse the record out of. Returns: Nothing. ''' if self._initialized: raise pycdlibexception.P...
[ "def", "parse", "(", "self", ",", "rrstr", ")", ":", "# type: (bytes) -> None", "if", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'TF record already initialized!'", ")", "# We assume that the caller has already checked t...
Parse a Rock Ridge Time Stamp record out of a string. Parameters: rrstr - The string to parse the record out of. Returns: Nothing.
[ "Parse", "a", "Rock", "Ridge", "Time", "Stamp", "record", "out", "of", "a", "string", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L1558-L1592
clalancette/pycdlib
pycdlib/rockridge.py
RRTFRecord.new
def new(self, time_flags): # type: (int) -> None ''' Create a new Rock Ridge Time Stamp record. Parameters: time_flags - The flags to use for this time stamp record. Returns: Nothing. ''' if self._initialized: raise pycdlibexception....
python
def new(self, time_flags): # type: (int) -> None ''' Create a new Rock Ridge Time Stamp record. Parameters: time_flags - The flags to use for this time stamp record. Returns: Nothing. ''' if self._initialized: raise pycdlibexception....
[ "def", "new", "(", "self", ",", "time_flags", ")", ":", "# type: (int) -> None", "if", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'TF record already initialized!'", ")", "self", ".", "time_flags", "=", "time_fla...
Create a new Rock Ridge Time Stamp record. Parameters: time_flags - The flags to use for this time stamp record. Returns: Nothing.
[ "Create", "a", "new", "Rock", "Ridge", "Time", "Stamp", "record", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L1594-L1621
clalancette/pycdlib
pycdlib/rockridge.py
RRTFRecord.record
def record(self): # type: () -> bytes ''' Generate a string representing the Rock Ridge Time Stamp record. Parameters: None. Returns: String containing the Rock Ridge record. ''' if not self._initialized: raise pycdlibexception.PyCdl...
python
def record(self): # type: () -> bytes ''' Generate a string representing the Rock Ridge Time Stamp record. Parameters: None. Returns: String containing the Rock Ridge record. ''' if not self._initialized: raise pycdlibexception.PyCdl...
[ "def", "record", "(", "self", ")", ":", "# type: () -> bytes", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'TF record not yet initialized!'", ")", "outlist", "=", "[", "b'TF'", ",", "struct", ".", ...
Generate a string representing the Rock Ridge Time Stamp record. Parameters: None. Returns: String containing the Rock Ridge record.
[ "Generate", "a", "string", "representing", "the", "Rock", "Ridge", "Time", "Stamp", "record", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L1623-L1642
clalancette/pycdlib
pycdlib/rockridge.py
RRTFRecord.length
def length(time_flags): # type: (int) -> int ''' Static method to return the length of the Rock Ridge Time Stamp record. Parameters: time_flags - Integer representing the flags to use. Returns: The length of this record in bytes. ''' tf_...
python
def length(time_flags): # type: (int) -> int ''' Static method to return the length of the Rock Ridge Time Stamp record. Parameters: time_flags - Integer representing the flags to use. Returns: The length of this record in bytes. ''' tf_...
[ "def", "length", "(", "time_flags", ")", ":", "# type: (int) -> int", "tf_each_size", "=", "7", "if", "time_flags", "&", "(", "1", "<<", "7", ")", ":", "tf_each_size", "=", "17", "time_flags", "&=", "0x7f", "tf_num", "=", "0", "while", "time_flags", ":", ...
Static method to return the length of the Rock Ridge Time Stamp record. Parameters: time_flags - Integer representing the flags to use. Returns: The length of this record in bytes.
[ "Static", "method", "to", "return", "the", "length", "of", "the", "Rock", "Ridge", "Time", "Stamp", "record", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L1645-L1665
clalancette/pycdlib
pycdlib/rockridge.py
RRSFRecord.parse
def parse(self, rrstr): # type: (bytes) -> None ''' Parse a Rock Ridge Sparse File record out of a string. Parameters: rrstr - The string to parse the record out of. Returns: Nothing. ''' if self._initialized: raise pycdlibexception....
python
def parse(self, rrstr): # type: (bytes) -> None ''' Parse a Rock Ridge Sparse File record out of a string. Parameters: rrstr - The string to parse the record out of. Returns: Nothing. ''' if self._initialized: raise pycdlibexception....
[ "def", "parse", "(", "self", ",", "rrstr", ")", ":", "# type: (bytes) -> None", "if", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'SF record already initialized!'", ")", "# We assume that the caller has already checked t...
Parse a Rock Ridge Sparse File record out of a string. Parameters: rrstr - The string to parse the record out of. Returns: Nothing.
[ "Parse", "a", "Rock", "Ridge", "Sparse", "File", "record", "out", "of", "a", "string", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L1683-L1721
clalancette/pycdlib
pycdlib/rockridge.py
RRSFRecord.new
def new(self, file_size_high, file_size_low, table_depth): # type: (Optional[int], int, Optional[int]) -> None ''' Create a new Rock Ridge Sparse File record. Parameters: file_size_high - The high-order 32-bits of the file size. file_size_low - The low-order 32-bits of...
python
def new(self, file_size_high, file_size_low, table_depth): # type: (Optional[int], int, Optional[int]) -> None ''' Create a new Rock Ridge Sparse File record. Parameters: file_size_high - The high-order 32-bits of the file size. file_size_low - The low-order 32-bits of...
[ "def", "new", "(", "self", ",", "file_size_high", ",", "file_size_low", ",", "table_depth", ")", ":", "# type: (Optional[int], int, Optional[int]) -> None", "if", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'SF recor...
Create a new Rock Ridge Sparse File record. Parameters: file_size_high - The high-order 32-bits of the file size. file_size_low - The low-order 32-bits of the file size. table_depth - The maximum virtual file size. Returns: Nothing.
[ "Create", "a", "new", "Rock", "Ridge", "Sparse", "File", "record", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L1723-L1742
clalancette/pycdlib
pycdlib/rockridge.py
RRSFRecord.record
def record(self): # type: () -> bytes ''' Generate a string representing the Rock Ridge Sparse File record. Parameters: None. Returns: String containing the Rock Ridge record. ''' if not self._initialized: raise pycdlibexception.PyCd...
python
def record(self): # type: () -> bytes ''' Generate a string representing the Rock Ridge Sparse File record. Parameters: None. Returns: String containing the Rock Ridge record. ''' if not self._initialized: raise pycdlibexception.PyCd...
[ "def", "record", "(", "self", ")", ":", "# type: () -> bytes", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'SF record not yet initialized!'", ")", "length", "=", "12", "if", "self", ".", "virtual_f...
Generate a string representing the Rock Ridge Sparse File record. Parameters: None. Returns: String containing the Rock Ridge record.
[ "Generate", "a", "string", "representing", "the", "Rock", "Ridge", "Sparse", "File", "record", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L1744-L1766
clalancette/pycdlib
pycdlib/rockridge.py
RRRERecord.record
def record(self): # type: () -> bytes ''' Generate a string representing the Rock Ridge Relocated Directory record. Parameters: None. Returns: String containing the Rock Ridge record. ''' if not self._initialized: raise pycdl...
python
def record(self): # type: () -> bytes ''' Generate a string representing the Rock Ridge Relocated Directory record. Parameters: None. Returns: String containing the Rock Ridge record. ''' if not self._initialized: raise pycdl...
[ "def", "record", "(", "self", ")", ":", "# type: () -> bytes", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'RE record not yet initialized!'", ")", "return", "b'RE'", "+", "struct", ".", "pack", "("...
Generate a string representing the Rock Ridge Relocated Directory record. Parameters: None. Returns: String containing the Rock Ridge record.
[ "Generate", "a", "string", "representing", "the", "Rock", "Ridge", "Relocated", "Directory", "record", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L1839-L1853
clalancette/pycdlib
pycdlib/rockridge.py
RRSTRecord.parse
def parse(self, rrstr): # type: (bytes) -> None ''' Parse a Rock Ridge System Terminator record out of a string. Parameters: rrstr - The string to parse the record out of. Returns: Nothing. ''' if self._initialized: raise pycdlibexce...
python
def parse(self, rrstr): # type: (bytes) -> None ''' Parse a Rock Ridge System Terminator record out of a string. Parameters: rrstr - The string to parse the record out of. Returns: Nothing. ''' if self._initialized: raise pycdlibexce...
[ "def", "parse", "(", "self", ",", "rrstr", ")", ":", "# type: (bytes) -> None", "if", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'ST record already initialized!'", ")", "(", "su_len", ",", "su_entry_version_unused...
Parse a Rock Ridge System Terminator record out of a string. Parameters: rrstr - The string to parse the record out of. Returns: Nothing.
[ "Parse", "a", "Rock", "Ridge", "System", "Terminator", "record", "out", "of", "a", "string", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L1882-L1903
clalancette/pycdlib
pycdlib/rockridge.py
RRSTRecord.record
def record(self): # type: () -> bytes ''' Generate a string representing the Rock Ridge System Terminator record. Parameters: None. Returns: String containing the Rock Ridge record. ''' if not self._initialized: raise pycdlib...
python
def record(self): # type: () -> bytes ''' Generate a string representing the Rock Ridge System Terminator record. Parameters: None. Returns: String containing the Rock Ridge record. ''' if not self._initialized: raise pycdlib...
[ "def", "record", "(", "self", ")", ":", "# type: () -> bytes", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'ST record not yet initialized!'", ")", "return", "b'ST'", "+", "struct", ".", "pack", "("...
Generate a string representing the Rock Ridge System Terminator record. Parameters: None. Returns: String containing the Rock Ridge record.
[ "Generate", "a", "string", "representing", "the", "Rock", "Ridge", "System", "Terminator", "record", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L1920-L1934
clalancette/pycdlib
pycdlib/rockridge.py
RRPDRecord.parse
def parse(self, rrstr): # type: (bytes) -> None ''' Parse a Rock Ridge Platform Dependent record out of a string. Parameters: rrstr - The string to parse the record out of. Returns: Nothing. ''' if self._initialized: raise pycdlibexc...
python
def parse(self, rrstr): # type: (bytes) -> None ''' Parse a Rock Ridge Platform Dependent record out of a string. Parameters: rrstr - The string to parse the record out of. Returns: Nothing. ''' if self._initialized: raise pycdlibexc...
[ "def", "parse", "(", "self", ",", "rrstr", ")", ":", "# type: (bytes) -> None", "if", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'PD record already initialized!'", ")", "(", "su_len_unused", ",", "su_entry_version...
Parse a Rock Ridge Platform Dependent record out of a string. Parameters: rrstr - The string to parse the record out of. Returns: Nothing.
[ "Parse", "a", "Rock", "Ridge", "Platform", "Dependent", "record", "out", "of", "a", "string", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L1963-L1983
clalancette/pycdlib
pycdlib/rockridge.py
RRPDRecord.new
def new(self): # type: () -> None ''' Create a new Rock Ridge Platform Dependent record. Parameters: None. Returns: Nothing. ''' if self._initialized: raise pycdlibexception.PyCdlibInternalError('PD record already initialized!') ...
python
def new(self): # type: () -> None ''' Create a new Rock Ridge Platform Dependent record. Parameters: None. Returns: Nothing. ''' if self._initialized: raise pycdlibexception.PyCdlibInternalError('PD record already initialized!') ...
[ "def", "new", "(", "self", ")", ":", "# type: () -> None", "if", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'PD record already initialized!'", ")", "self", ".", "_initialized", "=", "True", "self", ".", "paddi...
Create a new Rock Ridge Platform Dependent record. Parameters: None. Returns: Nothing.
[ "Create", "a", "new", "Rock", "Ridge", "Platform", "Dependent", "record", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L1985-L1999
clalancette/pycdlib
pycdlib/rockridge.py
RRPDRecord.record
def record(self): # type: () -> bytes ''' Generate a string representing the Rock Ridge Platform Dependent record. Parameters: None. Returns: String containing the Rock Ridge record. ''' if not self._initialized: raise pycdli...
python
def record(self): # type: () -> bytes ''' Generate a string representing the Rock Ridge Platform Dependent record. Parameters: None. Returns: String containing the Rock Ridge record. ''' if not self._initialized: raise pycdli...
[ "def", "record", "(", "self", ")", ":", "# type: () -> bytes", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'PD record not yet initialized!'", ")", "return", "b'PD'", "+", "struct", ".", "pack", "("...
Generate a string representing the Rock Ridge Platform Dependent record. Parameters: None. Returns: String containing the Rock Ridge record.
[ "Generate", "a", "string", "representing", "the", "Rock", "Ridge", "Platform", "Dependent", "record", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L2001-L2016
clalancette/pycdlib
pycdlib/rockridge.py
RockRidge.has_entry
def has_entry(self, name): # type: (str) -> bool ''' An internal method to tell if we have already parsed an entry of the named type. Parameters: name - The name of the entry to check. Returns: True if we have already parsed an entry of the named type, ...
python
def has_entry(self, name): # type: (str) -> bool ''' An internal method to tell if we have already parsed an entry of the named type. Parameters: name - The name of the entry to check. Returns: True if we have already parsed an entry of the named type, ...
[ "def", "has_entry", "(", "self", ",", "name", ")", ":", "# type: (str) -> bool", "return", "getattr", "(", "self", ".", "dr_entries", ",", "name", ")", "or", "getattr", "(", "self", ".", "ce_entries", ",", "name", ")" ]
An internal method to tell if we have already parsed an entry of the named type. Parameters: name - The name of the entry to check. Returns: True if we have already parsed an entry of the named type, False otherwise.
[ "An", "internal", "method", "to", "tell", "if", "we", "have", "already", "parsed", "an", "entry", "of", "the", "named", "type", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L2095-L2106
clalancette/pycdlib
pycdlib/rockridge.py
RockRidge.parse
def parse(self, record, is_first_dir_record_of_root, bytes_to_skip, continuation): # type: (bytes, bool, int, bool) -> None ''' Method to parse a rock ridge record. Parameters: record - The record to parse. is_first_dir_record_of_root - Whether this is the first direct...
python
def parse(self, record, is_first_dir_record_of_root, bytes_to_skip, continuation): # type: (bytes, bool, int, bool) -> None ''' Method to parse a rock ridge record. Parameters: record - The record to parse. is_first_dir_record_of_root - Whether this is the first direct...
[ "def", "parse", "(", "self", ",", "record", ",", "is_first_dir_record_of_root", ",", "bytes_to_skip", ",", "continuation", ")", ":", "# type: (bytes, bool, int, bool) -> None", "# Note that we very explicitly do not check if self._initialized is True", "# here; this can be called mul...
Method to parse a rock ridge record. Parameters: record - The record to parse. is_first_dir_record_of_root - Whether this is the first directory record of the root directory record; certain Rock Ridge entries are on...
[ "Method", "to", "parse", "a", "rock", "ridge", "record", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L2108-L2272
clalancette/pycdlib
pycdlib/rockridge.py
RockRidge._record
def _record(self, entries): # type: (RockRidgeEntries) -> bytes ''' Return a string representing the Rock Ridge entry. Parameters: entries - The dr_entries or ce_entries to generate a record for. Returns: A string representing the Rock Ridge entry. ''' ...
python
def _record(self, entries): # type: (RockRidgeEntries) -> bytes ''' Return a string representing the Rock Ridge entry. Parameters: entries - The dr_entries or ce_entries to generate a record for. Returns: A string representing the Rock Ridge entry. ''' ...
[ "def", "_record", "(", "self", ",", "entries", ")", ":", "# type: (RockRidgeEntries) -> bytes", "outlist", "=", "[", "]", "if", "entries", ".", "sp_record", "is", "not", "None", ":", "outlist", ".", "append", "(", "entries", ".", "sp_record", ".", "record", ...
Return a string representing the Rock Ridge entry. Parameters: entries - The dr_entries or ce_entries to generate a record for. Returns: A string representing the Rock Ridge entry.
[ "Return", "a", "string", "representing", "the", "Rock", "Ridge", "entry", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L2274-L2331
clalancette/pycdlib
pycdlib/rockridge.py
RockRidge.record_dr_entries
def record_dr_entries(self): # type: () -> bytes ''' Return a string representing the Rock Ridge entries in the Directory Record. Parameters: None. Returns: A string representing the Rock Ridge entry. ''' if not self._initialized: ra...
python
def record_dr_entries(self): # type: () -> bytes ''' Return a string representing the Rock Ridge entries in the Directory Record. Parameters: None. Returns: A string representing the Rock Ridge entry. ''' if not self._initialized: ra...
[ "def", "record_dr_entries", "(", "self", ")", ":", "# type: () -> bytes", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'Rock Ridge extension not yet initialized'", ")", "return", "self", ".", "_record", ...
Return a string representing the Rock Ridge entries in the Directory Record. Parameters: None. Returns: A string representing the Rock Ridge entry.
[ "Return", "a", "string", "representing", "the", "Rock", "Ridge", "entries", "in", "the", "Directory", "Record", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L2333-L2346
clalancette/pycdlib
pycdlib/rockridge.py
RockRidge.record_ce_entries
def record_ce_entries(self): # type: () -> bytes ''' Return a string representing the Rock Ridge entries in the Continuation Entry. Parameters: None. Returns: A string representing the Rock Ridge entry. ''' if not self._initialized: ...
python
def record_ce_entries(self): # type: () -> bytes ''' Return a string representing the Rock Ridge entries in the Continuation Entry. Parameters: None. Returns: A string representing the Rock Ridge entry. ''' if not self._initialized: ...
[ "def", "record_ce_entries", "(", "self", ")", ":", "# type: () -> bytes", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'Rock Ridge extension not yet initialized'", ")", "return", "self", ".", "_record", ...
Return a string representing the Rock Ridge entries in the Continuation Entry. Parameters: None. Returns: A string representing the Rock Ridge entry.
[ "Return", "a", "string", "representing", "the", "Rock", "Ridge", "entries", "in", "the", "Continuation", "Entry", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L2348-L2361
clalancette/pycdlib
pycdlib/rockridge.py
RockRidge._add_ce_record
def _add_ce_record(self, curr_dr_len, thislen): # type: (int, int) -> int ''' An internal method to add a new length to a Continuation Entry. If the Continuation Entry does not yet exist, this method creates it. Parameters: curr_dr_len - The current Directory Record le...
python
def _add_ce_record(self, curr_dr_len, thislen): # type: (int, int) -> int ''' An internal method to add a new length to a Continuation Entry. If the Continuation Entry does not yet exist, this method creates it. Parameters: curr_dr_len - The current Directory Record le...
[ "def", "_add_ce_record", "(", "self", ",", "curr_dr_len", ",", "thislen", ")", ":", "# type: (int, int) -> int", "if", "self", ".", "dr_entries", ".", "ce_record", "is", "None", ":", "self", ".", "dr_entries", ".", "ce_record", "=", "RRCERecord", "(", ")", "...
An internal method to add a new length to a Continuation Entry. If the Continuation Entry does not yet exist, this method creates it. Parameters: curr_dr_len - The current Directory Record length. thislen - The new length to add to the Continuation Entry. Returns: An...
[ "An", "internal", "method", "to", "add", "a", "new", "length", "to", "a", "Continuation", "Entry", ".", "If", "the", "Continuation", "Entry", "does", "not", "yet", "exist", "this", "method", "creates", "it", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L2363-L2381
clalancette/pycdlib
pycdlib/rockridge.py
RockRidge._new_symlink
def _new_symlink(self, symlink_path, curr_dr_len): # type: (bytes, int) -> int ''' An internal method to add the appropriate symlink record(s) to the ISO. Parameters: symlink_path - The absolute symlink path to add to the ISO. curr_dr_len - The current directory record...
python
def _new_symlink(self, symlink_path, curr_dr_len): # type: (bytes, int) -> int ''' An internal method to add the appropriate symlink record(s) to the ISO. Parameters: symlink_path - The absolute symlink path to add to the ISO. curr_dr_len - The current directory record...
[ "def", "_new_symlink", "(", "self", ",", "symlink_path", ",", "curr_dr_len", ")", ":", "# type: (bytes, int) -> int", "# This is more complicated than I realized. There are up to 3 layers", "# of maximum length:", "# 1. If we are still using the directory record, then we are", "# s...
An internal method to add the appropriate symlink record(s) to the ISO. Parameters: symlink_path - The absolute symlink path to add to the ISO. curr_dr_len - The current directory record length. Returns: The new directory record length.
[ "An", "internal", "method", "to", "add", "the", "appropriate", "symlink", "record", "(", "s", ")", "to", "the", "ISO", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L2383-L2500
clalancette/pycdlib
pycdlib/rockridge.py
RockRidge._add_name
def _add_name(self, rr_name, curr_dr_len): # type: (bytes, int) -> int ''' An internal method to add the appropriate name records to the ISO. Parameters: rr_name - The Rock Ridge name to add to the ISO. curr_dr_len - The current directory record length. Returns...
python
def _add_name(self, rr_name, curr_dr_len): # type: (bytes, int) -> int ''' An internal method to add the appropriate name records to the ISO. Parameters: rr_name - The Rock Ridge name to add to the ISO. curr_dr_len - The current directory record length. Returns...
[ "def", "_add_name", "(", "self", ",", "rr_name", ",", "curr_dr_len", ")", ":", "# type: (bytes, int) -> int", "# The length we are putting in this object (as opposed to the", "# continuation entry) is the maximum, minus how much is already in the", "# DR, minus 5 for the NM metadata. We k...
An internal method to add the appropriate name records to the ISO. Parameters: rr_name - The Rock Ridge name to add to the ISO. curr_dr_len - The current directory record length. Returns: The new directory record length.
[ "An", "internal", "method", "to", "add", "the", "appropriate", "name", "records", "to", "the", "ISO", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L2502-L2549
clalancette/pycdlib
pycdlib/rockridge.py
RockRidge.new
def new(self, is_first_dir_record_of_root, rr_name, file_mode, symlink_path, rr_version, rr_relocated_child, rr_relocated, rr_relocated_parent, bytes_to_skip, curr_dr_len): # type: (bool, bytes, int, bytes, str, bool, bool, bool, int, int) -> int ''' Create a new Rock Rid...
python
def new(self, is_first_dir_record_of_root, rr_name, file_mode, symlink_path, rr_version, rr_relocated_child, rr_relocated, rr_relocated_parent, bytes_to_skip, curr_dr_len): # type: (bool, bytes, int, bytes, str, bool, bool, bool, int, int) -> int ''' Create a new Rock Rid...
[ "def", "new", "(", "self", ",", "is_first_dir_record_of_root", ",", "rr_name", ",", "file_mode", ",", "symlink_path", ",", "rr_version", ",", "rr_relocated_child", ",", "rr_relocated", ",", "rr_relocated_parent", ",", "bytes_to_skip", ",", "curr_dr_len", ")", ":", ...
Create a new Rock Ridge record. Parameters: is_first_dir_record_of_root - Whether this is the first directory record of the root directory record; certain Rock Ridge entries are only va...
[ "Create", "a", "new", "Rock", "Ridge", "record", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L2551-L2726
clalancette/pycdlib
pycdlib/rockridge.py
RockRidge.add_to_file_links
def add_to_file_links(self): # type: () -> None ''' Increment the number of POSIX file links on this entry by one. Parameters: None. Returns: Nothing. ''' if not self._initialized: raise pycdlibexception.PyCdlibInternalError('Rock Ri...
python
def add_to_file_links(self): # type: () -> None ''' Increment the number of POSIX file links on this entry by one. Parameters: None. Returns: Nothing. ''' if not self._initialized: raise pycdlibexception.PyCdlibInternalError('Rock Ri...
[ "def", "add_to_file_links", "(", "self", ")", ":", "# type: () -> None", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'Rock Ridge extension not yet initialized'", ")", "if", "self", ".", "dr_entries", "...
Increment the number of POSIX file links on this entry by one. Parameters: None. Returns: Nothing.
[ "Increment", "the", "number", "of", "POSIX", "file", "links", "on", "this", "entry", "by", "one", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L2728-L2746
clalancette/pycdlib
pycdlib/rockridge.py
RockRidge.copy_file_links
def copy_file_links(self, src): # type: (RockRidge) -> None ''' Copy the number of file links from the source Rock Ridge entry into this Rock Ridge entry. Parameters: src - The source Rock Ridge entry to copy from. Returns: Nothing. ''' ...
python
def copy_file_links(self, src): # type: (RockRidge) -> None ''' Copy the number of file links from the source Rock Ridge entry into this Rock Ridge entry. Parameters: src - The source Rock Ridge entry to copy from. Returns: Nothing. ''' ...
[ "def", "copy_file_links", "(", "self", ",", "src", ")", ":", "# type: (RockRidge) -> None", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'Rock Ridge extension not yet initialized'", ")", "# First, get the s...
Copy the number of file links from the source Rock Ridge entry into this Rock Ridge entry. Parameters: src - The source Rock Ridge entry to copy from. Returns: Nothing.
[ "Copy", "the", "number", "of", "file", "links", "from", "the", "source", "Rock", "Ridge", "entry", "into", "this", "Rock", "Ridge", "entry", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L2768-L2796
clalancette/pycdlib
pycdlib/rockridge.py
RockRidge.get_file_mode
def get_file_mode(self): # type: () -> int ''' Get the POSIX file mode bits for this Rock Ridge entry. Parameters: None. Returns: The POSIX file mode bits for this Rock Ridge entry. ''' if not self._initialized: raise pycdlibexceptio...
python
def get_file_mode(self): # type: () -> int ''' Get the POSIX file mode bits for this Rock Ridge entry. Parameters: None. Returns: The POSIX file mode bits for this Rock Ridge entry. ''' if not self._initialized: raise pycdlibexceptio...
[ "def", "get_file_mode", "(", "self", ")", ":", "# type: () -> int", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'Rock Ridge extension not yet initialized'", ")", "if", "self", ".", "dr_entries", ".", ...
Get the POSIX file mode bits for this Rock Ridge entry. Parameters: None. Returns: The POSIX file mode bits for this Rock Ridge entry.
[ "Get", "the", "POSIX", "file", "mode", "bits", "for", "this", "Rock", "Ridge", "entry", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L2798-L2816
clalancette/pycdlib
pycdlib/rockridge.py
RockRidge._is_symlink
def _is_symlink(self): # type: () -> bool ''' Internal method to determine whether this Rock Ridge entry is a symlink. ''' return len(self.dr_entries.sl_records) > 0 or len(self.ce_entries.sl_records) > 0
python
def _is_symlink(self): # type: () -> bool ''' Internal method to determine whether this Rock Ridge entry is a symlink. ''' return len(self.dr_entries.sl_records) > 0 or len(self.ce_entries.sl_records) > 0
[ "def", "_is_symlink", "(", "self", ")", ":", "# type: () -> bool", "return", "len", "(", "self", ".", "dr_entries", ".", "sl_records", ")", ">", "0", "or", "len", "(", "self", ".", "ce_entries", ".", "sl_records", ")", ">", "0" ]
Internal method to determine whether this Rock Ridge entry is a symlink.
[ "Internal", "method", "to", "determine", "whether", "this", "Rock", "Ridge", "entry", "is", "a", "symlink", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L2833-L2838
clalancette/pycdlib
pycdlib/rockridge.py
RockRidge.symlink_path
def symlink_path(self): # type: () -> bytes ''' Get the path as a string of the symlink target of this Rock Ridge entry (if this is a symlink). Parameters: None. Returns: Symlink path as a string. ''' if not self._initialized: ...
python
def symlink_path(self): # type: () -> bytes ''' Get the path as a string of the symlink target of this Rock Ridge entry (if this is a symlink). Parameters: None. Returns: Symlink path as a string. ''' if not self._initialized: ...
[ "def", "symlink_path", "(", "self", ")", ":", "# type: () -> bytes", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'Rock Ridge extension not yet initialized'", ")", "if", "not", "self", ".", "is_symlink"...
Get the path as a string of the symlink target of this Rock Ridge entry (if this is a symlink). Parameters: None. Returns: Symlink path as a string.
[ "Get", "the", "path", "as", "a", "string", "of", "the", "symlink", "target", "of", "this", "Rock", "Ridge", "entry", "(", "if", "this", "is", "a", "symlink", ")", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L2855-L2885
clalancette/pycdlib
pycdlib/rockridge.py
RockRidge.child_link_record_exists
def child_link_record_exists(self): # type: () -> bool ''' Determine whether this Rock Ridge entry has a child link record (used for relocating deep directory records). Parameters: None. Returns: True if this Rock Ridge entry has a child link record, Fa...
python
def child_link_record_exists(self): # type: () -> bool ''' Determine whether this Rock Ridge entry has a child link record (used for relocating deep directory records). Parameters: None. Returns: True if this Rock Ridge entry has a child link record, Fa...
[ "def", "child_link_record_exists", "(", "self", ")", ":", "# type: () -> bool", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'Rock Ridge extension not yet initialized'", ")", "return", "self", ".", "dr_en...
Determine whether this Rock Ridge entry has a child link record (used for relocating deep directory records). Parameters: None. Returns: True if this Rock Ridge entry has a child link record, False otherwise.
[ "Determine", "whether", "this", "Rock", "Ridge", "entry", "has", "a", "child", "link", "record", "(", "used", "for", "relocating", "deep", "directory", "records", ")", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L2887-L2901
clalancette/pycdlib
pycdlib/rockridge.py
RockRidge.child_link_update_from_dirrecord
def child_link_update_from_dirrecord(self): # type: () -> None ''' Update the logical extent number stored in the child link record (if there is one), from the directory record entry that was stored in the child_link member. This is used at the end of reshuffling extents ...
python
def child_link_update_from_dirrecord(self): # type: () -> None ''' Update the logical extent number stored in the child link record (if there is one), from the directory record entry that was stored in the child_link member. This is used at the end of reshuffling extents ...
[ "def", "child_link_update_from_dirrecord", "(", "self", ")", ":", "# type: () -> None", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'Rock Ridge extension not yet initialized'", ")", "if", "self", ".", "c...
Update the logical extent number stored in the child link record (if there is one), from the directory record entry that was stored in the child_link member. This is used at the end of reshuffling extents to properly update the child link records. Parameters: None. Ret...
[ "Update", "the", "logical", "extent", "number", "stored", "in", "the", "child", "link", "record", "(", "if", "there", "is", "one", ")", "from", "the", "directory", "record", "entry", "that", "was", "stored", "in", "the", "child_link", "member", ".", "This"...
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L2903-L2927
clalancette/pycdlib
pycdlib/rockridge.py
RockRidge.child_link_extent
def child_link_extent(self): # type: () -> int ''' Get the extent of the child of this entry if it has one. Parameters: None. Returns: The logical block number of the child if it exists. ''' if not self._initialized: raise pycdlibexc...
python
def child_link_extent(self): # type: () -> int ''' Get the extent of the child of this entry if it has one. Parameters: None. Returns: The logical block number of the child if it exists. ''' if not self._initialized: raise pycdlibexc...
[ "def", "child_link_extent", "(", "self", ")", ":", "# type: () -> int", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'Rock Ridge extension not yet initialized'", ")", "if", "self", ".", "dr_entries", "....
Get the extent of the child of this entry if it has one. Parameters: None. Returns: The logical block number of the child if it exists.
[ "Get", "the", "extent", "of", "the", "child", "of", "this", "entry", "if", "it", "has", "one", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L2929-L2947
clalancette/pycdlib
pycdlib/rockridge.py
RockRidge.parent_link_record_exists
def parent_link_record_exists(self): # type: () -> bool ''' Determine whether this Rock Ridge entry has a parent link record (used for relocating deep directory records). Parameters: None: Returns: True if this Rock Ridge entry has a parent link record,...
python
def parent_link_record_exists(self): # type: () -> bool ''' Determine whether this Rock Ridge entry has a parent link record (used for relocating deep directory records). Parameters: None: Returns: True if this Rock Ridge entry has a parent link record,...
[ "def", "parent_link_record_exists", "(", "self", ")", ":", "# type: () -> bool", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'Rock Ridge extension not yet initialized'", ")", "return", "self", ".", "dr_e...
Determine whether this Rock Ridge entry has a parent link record (used for relocating deep directory records). Parameters: None: Returns: True if this Rock Ridge entry has a parent link record, False otherwise.
[ "Determine", "whether", "this", "Rock", "Ridge", "entry", "has", "a", "parent", "link", "record", "(", "used", "for", "relocating", "deep", "directory", "records", ")", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L2949-L2963
clalancette/pycdlib
pycdlib/rockridge.py
RockRidge.parent_link_update_from_dirrecord
def parent_link_update_from_dirrecord(self): # type: () -> None ''' Update the logical extent number stored in the parent link record (if there is one), from the directory record entry that was stored in the parent_link member. This is used at the end of reshuffling extents ...
python
def parent_link_update_from_dirrecord(self): # type: () -> None ''' Update the logical extent number stored in the parent link record (if there is one), from the directory record entry that was stored in the parent_link member. This is used at the end of reshuffling extents ...
[ "def", "parent_link_update_from_dirrecord", "(", "self", ")", ":", "# type: () -> None", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'Rock Ridge extension not yet initialized'", ")", "if", "self", ".", "...
Update the logical extent number stored in the parent link record (if there is one), from the directory record entry that was stored in the parent_link member. This is used at the end of reshuffling extents to properly update the parent link records. Parameters: None. ...
[ "Update", "the", "logical", "extent", "number", "stored", "in", "the", "parent", "link", "record", "(", "if", "there", "is", "one", ")", "from", "the", "directory", "record", "entry", "that", "was", "stored", "in", "the", "parent_link", "member", ".", "Thi...
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L2965-L2989
clalancette/pycdlib
pycdlib/rockridge.py
RockRidge.parent_link_extent
def parent_link_extent(self): # type: () -> int ''' Get the extent of the parent of this entry if it has one. Parameters: None. Returns: The logical block number of the parent if it exists. ''' if not self._initialized: raise pycdlib...
python
def parent_link_extent(self): # type: () -> int ''' Get the extent of the parent of this entry if it has one. Parameters: None. Returns: The logical block number of the parent if it exists. ''' if not self._initialized: raise pycdlib...
[ "def", "parent_link_extent", "(", "self", ")", ":", "# type: () -> int", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'Rock Ridge extension not yet initialized'", ")", "if", "self", ".", "dr_entries", "...
Get the extent of the parent of this entry if it has one. Parameters: None. Returns: The logical block number of the parent if it exists.
[ "Get", "the", "extent", "of", "the", "parent", "of", "this", "entry", "if", "it", "has", "one", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L2991-L3009
clalancette/pycdlib
pycdlib/rockridge.py
RockRidge.relocated_record
def relocated_record(self): # type: () -> bool ''' Determine whether this Rock Ridge entry has a relocated record (used for relocating deep directory records). Parameters: None. Returns: True if this Rock Ridge entry has a relocated record, False otherw...
python
def relocated_record(self): # type: () -> bool ''' Determine whether this Rock Ridge entry has a relocated record (used for relocating deep directory records). Parameters: None. Returns: True if this Rock Ridge entry has a relocated record, False otherw...
[ "def", "relocated_record", "(", "self", ")", ":", "# type: () -> bool", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'Rock Ridge extension not yet initialized'", ")", "return", "self", ".", "dr_entries", ...
Determine whether this Rock Ridge entry has a relocated record (used for relocating deep directory records). Parameters: None. Returns: True if this Rock Ridge entry has a relocated record, False otherwise.
[ "Determine", "whether", "this", "Rock", "Ridge", "entry", "has", "a", "relocated", "record", "(", "used", "for", "relocating", "deep", "directory", "records", ")", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L3011-L3025
clalancette/pycdlib
pycdlib/rockridge.py
RockRidge.update_ce_block
def update_ce_block(self, block): # type: (RockRidgeContinuationBlock) -> None ''' Update the Continuation Entry block object used by this Rock Ridge Record. Parameters: block - The new block object. Returns: Nothing. ''' if not self._initialize...
python
def update_ce_block(self, block): # type: (RockRidgeContinuationBlock) -> None ''' Update the Continuation Entry block object used by this Rock Ridge Record. Parameters: block - The new block object. Returns: Nothing. ''' if not self._initialize...
[ "def", "update_ce_block", "(", "self", ",", "block", ")", ":", "# type: (RockRidgeContinuationBlock) -> None", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'Rock Ridge extension not yet initialized'", ")", ...
Update the Continuation Entry block object used by this Rock Ridge Record. Parameters: block - The new block object. Returns: Nothing.
[ "Update", "the", "Continuation", "Entry", "block", "object", "used", "by", "this", "Rock", "Ridge", "Record", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L3027-L3040
clalancette/pycdlib
pycdlib/rockridge.py
RockRidgeContinuationBlock.track_entry
def track_entry(self, offset, length): # type: (int, int) -> None ''' Track an already allocated entry in this Rock Ridge Continuation Block. Parameters: offset - The offset at which to place the entry. length - The length of the entry to track. Returns: ...
python
def track_entry(self, offset, length): # type: (int, int) -> None ''' Track an already allocated entry in this Rock Ridge Continuation Block. Parameters: offset - The offset at which to place the entry. length - The length of the entry to track. Returns: ...
[ "def", "track_entry", "(", "self", ",", "offset", ",", "length", ")", ":", "# type: (int, int) -> None", "newlen", "=", "offset", "+", "length", "-", "1", "for", "entry", "in", "self", ".", "_entries", ":", "thislen", "=", "entry", ".", "offset", "+", "e...
Track an already allocated entry in this Rock Ridge Continuation Block. Parameters: offset - The offset at which to place the entry. length - The length of the entry to track. Returns: Nothing.
[ "Track", "an", "already", "allocated", "entry", "in", "this", "Rock", "Ridge", "Continuation", "Block", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L3125-L3149
clalancette/pycdlib
pycdlib/rockridge.py
RockRidgeContinuationBlock.add_entry
def add_entry(self, length): # type: (int) -> int ''' Add a new entry to this Rock Ridge Continuation Block. This method attempts to find a gap that fits the new length anywhere within this Continuation Block. If successful, it returns the offset at which it placed this...
python
def add_entry(self, length): # type: (int) -> int ''' Add a new entry to this Rock Ridge Continuation Block. This method attempts to find a gap that fits the new length anywhere within this Continuation Block. If successful, it returns the offset at which it placed this...
[ "def", "add_entry", "(", "self", ",", "length", ")", ":", "# type: (int) -> int", "offset", "=", "-", "1", "# Need to find a gap", "for", "index", ",", "entry", "in", "enumerate", "(", "self", ".", "_entries", ")", ":", "if", "index", "==", "0", ":", "if...
Add a new entry to this Rock Ridge Continuation Block. This method attempts to find a gap that fits the new length anywhere within this Continuation Block. If successful, it returns the offset at which it placed this entry. If unsuccessful, it returns None. Parameters: lengt...
[ "Add", "a", "new", "entry", "to", "this", "Rock", "Ridge", "Continuation", "Block", ".", "This", "method", "attempts", "to", "find", "a", "gap", "that", "fits", "the", "new", "length", "anywhere", "within", "this", "Continuation", "Block", ".", "If", "succ...
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L3151-L3197
clalancette/pycdlib
pycdlib/rockridge.py
RockRidgeContinuationBlock.remove_entry
def remove_entry(self, offset, length): # type: (int, int) -> None ''' Given an offset and length, find and remove the entry in this block that corresponds. Parameters: offset - The offset of the entry to look for. length - The length of the entry to look for. ...
python
def remove_entry(self, offset, length): # type: (int, int) -> None ''' Given an offset and length, find and remove the entry in this block that corresponds. Parameters: offset - The offset of the entry to look for. length - The length of the entry to look for. ...
[ "def", "remove_entry", "(", "self", ",", "offset", ",", "length", ")", ":", "# type: (int, int) -> None", "for", "index", ",", "entry", "in", "enumerate", "(", "self", ".", "_entries", ")", ":", "if", "entry", ".", "offset", "==", "offset", "and", "entry",...
Given an offset and length, find and remove the entry in this block that corresponds. Parameters: offset - The offset of the entry to look for. length - The length of the entry to look for. Returns: Nothing.
[ "Given", "an", "offset", "and", "length", "find", "and", "remove", "the", "entry", "in", "this", "block", "that", "corresponds", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/rockridge.py#L3199-L3216
clalancette/pycdlib
pycdlib/udf.py
crc_ccitt
def crc_ccitt(data): # type: (bytes) -> int ''' Calculate the CRC over a range of bytes using the CCITT polynomial. Parameters: data - The array of bytes to calculate the CRC over. Returns: The CCITT CRC of the data. ''' crc = 0 if not have_py_3: for x in data: ...
python
def crc_ccitt(data): # type: (bytes) -> int ''' Calculate the CRC over a range of bytes using the CCITT polynomial. Parameters: data - The array of bytes to calculate the CRC over. Returns: The CCITT CRC of the data. ''' crc = 0 if not have_py_3: for x in data: ...
[ "def", "crc_ccitt", "(", "data", ")", ":", "# type: (bytes) -> int", "crc", "=", "0", "if", "not", "have_py_3", ":", "for", "x", "in", "data", ":", "crc", "=", "crc_ccitt_table", "[", "ord", "(", "x", ")", "^", "(", "(", "crc", ">>", "8", ")", "&",...
Calculate the CRC over a range of bytes using the CCITT polynomial. Parameters: data - The array of bytes to calculate the CRC over. Returns: The CCITT CRC of the data.
[ "Calculate", "the", "CRC", "over", "a", "range", "of", "bytes", "using", "the", "CCITT", "polynomial", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/udf.py#L93-L112
clalancette/pycdlib
pycdlib/udf.py
_ostaunicode
def _ostaunicode(src): # type: (str) -> bytes ''' Internal function to create an OSTA byte string from a source string. ''' if have_py_3: bytename = src else: bytename = src.decode('utf-8') # type: ignore try: enc = bytename.encode('latin-1') encbyte = b'\x0...
python
def _ostaunicode(src): # type: (str) -> bytes ''' Internal function to create an OSTA byte string from a source string. ''' if have_py_3: bytename = src else: bytename = src.decode('utf-8') # type: ignore try: enc = bytename.encode('latin-1') encbyte = b'\x0...
[ "def", "_ostaunicode", "(", "src", ")", ":", "# type: (str) -> bytes", "if", "have_py_3", ":", "bytename", "=", "src", "else", ":", "bytename", "=", "src", ".", "decode", "(", "'utf-8'", ")", "# type: ignore", "try", ":", "enc", "=", "bytename", ".", "enco...
Internal function to create an OSTA byte string from a source string.
[ "Internal", "function", "to", "create", "an", "OSTA", "byte", "string", "from", "a", "source", "string", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/udf.py#L115-L131
clalancette/pycdlib
pycdlib/udf.py
_ostaunicode_zero_pad
def _ostaunicode_zero_pad(src, fulllen): # type: (str, int) -> bytes ''' Internal function to create a zero-padded Identifier byte string from a source string. Parameters: src - The src string to start from. fulllen - The padded out length of the result. Returns: A full identifie...
python
def _ostaunicode_zero_pad(src, fulllen): # type: (str, int) -> bytes ''' Internal function to create a zero-padded Identifier byte string from a source string. Parameters: src - The src string to start from. fulllen - The padded out length of the result. Returns: A full identifie...
[ "def", "_ostaunicode_zero_pad", "(", "src", ",", "fulllen", ")", ":", "# type: (str, int) -> bytes", "byte_src", "=", "_ostaunicode", "(", "src", ")", "return", "byte_src", "+", "b'\\x00'", "*", "(", "fulllen", "-", "1", "-", "len", "(", "byte_src", ")", ")"...
Internal function to create a zero-padded Identifier byte string from a source string. Parameters: src - The src string to start from. fulllen - The padded out length of the result. Returns: A full identifier byte string containing the source string.
[ "Internal", "function", "to", "create", "a", "zero", "-", "padded", "Identifier", "byte", "string", "from", "a", "source", "string", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/udf.py#L134-L147
clalancette/pycdlib
pycdlib/udf.py
_compute_csum
def _compute_csum(data): # type: (bytes) -> int ''' A method to compute a simple checksum over the given data. Parameters: data - The data to compute the checksum over. Returns: The checksum. ''' def identity(x): # type: (int) -> int ''' The identity functi...
python
def _compute_csum(data): # type: (bytes) -> int ''' A method to compute a simple checksum over the given data. Parameters: data - The data to compute the checksum over. Returns: The checksum. ''' def identity(x): # type: (int) -> int ''' The identity functi...
[ "def", "_compute_csum", "(", "data", ")", ":", "# type: (bytes) -> int", "def", "identity", "(", "x", ")", ":", "# type: (int) -> int", "'''\n The identity function so we can use a function for python2/3\n compatibility.\n '''", "return", "x", "if", "isinstan...
A method to compute a simple checksum over the given data. Parameters: data - The data to compute the checksum over. Returns: The checksum.
[ "A", "method", "to", "compute", "a", "simple", "checksum", "over", "the", "given", "data", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/udf.py#L486-L516
clalancette/pycdlib
pycdlib/udf.py
symlink_to_bytes
def symlink_to_bytes(symlink_target): # type: (str) -> bytes ''' A function to generate UDF symlink data from a Unix-like path. Parameters: symlink_target - The Unix-like path that is the symlink. Returns: The UDF data corresponding to the symlink. ''' symlink_data = bytearray() ...
python
def symlink_to_bytes(symlink_target): # type: (str) -> bytes ''' A function to generate UDF symlink data from a Unix-like path. Parameters: symlink_target - The Unix-like path that is the symlink. Returns: The UDF data corresponding to the symlink. ''' symlink_data = bytearray() ...
[ "def", "symlink_to_bytes", "(", "symlink_target", ")", ":", "# type: (str) -> bytes", "symlink_data", "=", "bytearray", "(", ")", "for", "comp", "in", "symlink_target", ".", "split", "(", "'/'", ")", ":", "if", "comp", "==", "''", ":", "# If comp is empty, then ...
A function to generate UDF symlink data from a Unix-like path. Parameters: symlink_target - The Unix-like path that is the symlink. Returns: The UDF data corresponding to the symlink.
[ "A", "function", "to", "generate", "UDF", "symlink", "data", "from", "a", "Unix", "-", "like", "path", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/udf.py#L3554-L3582
clalancette/pycdlib
pycdlib/udf.py
BEAVolumeStructure.set_extent_location
def set_extent_location(self, extent): # type: (int) -> None ''' A method to set the new location for this UDF BEA Volume Structure. Parameters: extent - The new extent location to set for this UDF BEA Volume Structure. Returns: Nothing. ''' if ...
python
def set_extent_location(self, extent): # type: (int) -> None ''' A method to set the new location for this UDF BEA Volume Structure. Parameters: extent - The new extent location to set for this UDF BEA Volume Structure. Returns: Nothing. ''' if ...
[ "def", "set_extent_location", "(", "self", ",", "extent", ")", ":", "# type: (int) -> None", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'This Volume Descriptor is not yet initialized'", ")", "self", "."...
A method to set the new location for this UDF BEA Volume Structure. Parameters: extent - The new extent location to set for this UDF BEA Volume Structure. Returns: Nothing.
[ "A", "method", "to", "set", "the", "new", "location", "for", "this", "UDF", "BEA", "Volume", "Structure", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/udf.py#L253-L265
clalancette/pycdlib
pycdlib/udf.py
NSRVolumeStructure.parse
def parse(self, data, extent): # type: (bytes, int) -> None ''' Parse the passed in data into a UDF NSR Volume Structure. Parameters: data - The data to parse. extent - The extent that this descriptor currently lives at. Returns: Nothing. ''' ...
python
def parse(self, data, extent): # type: (bytes, int) -> None ''' Parse the passed in data into a UDF NSR Volume Structure. Parameters: data - The data to parse. extent - The extent that this descriptor currently lives at. Returns: Nothing. ''' ...
[ "def", "parse", "(", "self", ",", "data", ",", "extent", ")", ":", "# type: (bytes, int) -> None", "if", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'UDF NSR Volume Structure already initialized'", ")", "(", "struc...
Parse the passed in data into a UDF NSR Volume Structure. Parameters: data - The data to parse. extent - The extent that this descriptor currently lives at. Returns: Nothing.
[ "Parse", "the", "passed", "in", "data", "into", "a", "UDF", "NSR", "Volume", "Structure", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/udf.py#L282-L310
clalancette/pycdlib
pycdlib/udf.py
NSRVolumeStructure.record
def record(self): # type: () -> bytes ''' A method to generate the string representing this UDF NSR Volume Structure. Parameters: None. Returns: A string representing this UDF BEA Volume Strucutre. ''' if not self._initialized: ...
python
def record(self): # type: () -> bytes ''' A method to generate the string representing this UDF NSR Volume Structure. Parameters: None. Returns: A string representing this UDF BEA Volume Strucutre. ''' if not self._initialized: ...
[ "def", "record", "(", "self", ")", ":", "# type: () -> bytes", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'UDF NSR Volume Structure not initialized'", ")", "return", "struct", ".", "pack", "(", "sel...
A method to generate the string representing this UDF NSR Volume Structure. Parameters: None. Returns: A string representing this UDF BEA Volume Strucutre.
[ "A", "method", "to", "generate", "the", "string", "representing", "this", "UDF", "NSR", "Volume", "Structure", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/udf.py#L312-L325
clalancette/pycdlib
pycdlib/udf.py
NSRVolumeStructure.new
def new(self, version): # type: () -> None ''' A method to create a new UDF NSR Volume Structure. Parameters: None. Returns: Nothing. ''' if self._initialized: raise pycdlibexception.PyCdlibInternalError('UDF NSR Volume Structure alr...
python
def new(self, version): # type: () -> None ''' A method to create a new UDF NSR Volume Structure. Parameters: None. Returns: Nothing. ''' if self._initialized: raise pycdlibexception.PyCdlibInternalError('UDF NSR Volume Structure alr...
[ "def", "new", "(", "self", ",", "version", ")", ":", "# type: () -> None", "if", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'UDF NSR Volume Structure already initialized'", ")", "if", "version", "==", "2", ":", ...
A method to create a new UDF NSR Volume Structure. Parameters: None. Returns: Nothing.
[ "A", "method", "to", "create", "a", "new", "UDF", "NSR", "Volume", "Structure", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/udf.py#L327-L347
clalancette/pycdlib
pycdlib/udf.py
NSRVolumeStructure.extent_location
def extent_location(self): # type: () -> int ''' A method to get the extent location of this UDF NSR Volume Structure. Parameters: None. Returns: Integer extent location of this UDF NSR Volume Structure. ''' if not self._initialized: ...
python
def extent_location(self): # type: () -> int ''' A method to get the extent location of this UDF NSR Volume Structure. Parameters: None. Returns: Integer extent location of this UDF NSR Volume Structure. ''' if not self._initialized: ...
[ "def", "extent_location", "(", "self", ")", ":", "# type: () -> int", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'UDF NSR Volume Structure not yet initialized'", ")", "if", "self", ".", "new_extent_loc"...
A method to get the extent location of this UDF NSR Volume Structure. Parameters: None. Returns: Integer extent location of this UDF NSR Volume Structure.
[ "A", "method", "to", "get", "the", "extent", "location", "of", "this", "UDF", "NSR", "Volume", "Structure", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/udf.py#L349-L364
clalancette/pycdlib
pycdlib/udf.py
UDFTag.parse
def parse(self, data, extent): # type: (bytes, int) -> None ''' Parse the passed in data into a UDF Descriptor tag. Parameters: data - The data to parse. extent - The extent to compare against for the tag location. Returns: Nothing. ''' ...
python
def parse(self, data, extent): # type: (bytes, int) -> None ''' Parse the passed in data into a UDF Descriptor tag. Parameters: data - The data to parse. extent - The extent to compare against for the tag location. Returns: Nothing. ''' ...
[ "def", "parse", "(", "self", ",", "data", ",", "extent", ")", ":", "# type: (bytes, int) -> None", "if", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'UDF Tag already initialized'", ")", "(", "self", ".", "tag_i...
Parse the passed in data into a UDF Descriptor tag. Parameters: data - The data to parse. extent - The extent to compare against for the tag location. Returns: Nothing.
[ "Parse", "the", "passed", "in", "data", "into", "a", "UDF", "Descriptor", "tag", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/udf.py#L533-L576
clalancette/pycdlib
pycdlib/udf.py
UDFTag.record
def record(self, crc_bytes): # type: (bytes) -> bytes ''' A method to generate the string representing this UDF Descriptor Tag. Parameters: crc_bytes - The string to compute the CRC over. Returns: A string representing this UDF Descriptor Tag. ''' ...
python
def record(self, crc_bytes): # type: (bytes) -> bytes ''' A method to generate the string representing this UDF Descriptor Tag. Parameters: crc_bytes - The string to compute the CRC over. Returns: A string representing this UDF Descriptor Tag. ''' ...
[ "def", "record", "(", "self", ",", "crc_bytes", ")", ":", "# type: (bytes) -> bytes", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'UDF Descriptor Tag not initialized'", ")", "crc_byte_len", "=", "len",...
A method to generate the string representing this UDF Descriptor Tag. Parameters: crc_bytes - The string to compute the CRC over. Returns: A string representing this UDF Descriptor Tag.
[ "A", "method", "to", "generate", "the", "string", "representing", "this", "UDF", "Descriptor", "Tag", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/udf.py#L578-L605
clalancette/pycdlib
pycdlib/udf.py
UDFTag.new
def new(self, tag_ident, tag_serial=0): # type: (int, int) -> None ''' A method to create a new UDF Descriptor Tag. Parameters: tag_ident - The tag identifier number for this tag. tag_serial - The tag serial number for this tag. Returns: Nothing ...
python
def new(self, tag_ident, tag_serial=0): # type: (int, int) -> None ''' A method to create a new UDF Descriptor Tag. Parameters: tag_ident - The tag identifier number for this tag. tag_serial - The tag serial number for this tag. Returns: Nothing ...
[ "def", "new", "(", "self", ",", "tag_ident", ",", "tag_serial", "=", "0", ")", ":", "# type: (int, int) -> None", "if", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'UDF Tag already initialized'", ")", "self", "...
A method to create a new UDF Descriptor Tag. Parameters: tag_ident - The tag identifier number for this tag. tag_serial - The tag serial number for this tag. Returns: Nothing
[ "A", "method", "to", "create", "a", "new", "UDF", "Descriptor", "Tag", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/udf.py#L607-L626
clalancette/pycdlib
pycdlib/udf.py
UDFAnchorVolumeStructure.parse
def parse(self, data, extent, desc_tag): # type: (bytes, int, UDFTag) -> None ''' Parse the passed in data into a UDF Anchor Volume Structure. Parameters: data - The data to parse. extent - The extent that this descriptor currently lives at. desc_tag - A UDFTa...
python
def parse(self, data, extent, desc_tag): # type: (bytes, int, UDFTag) -> None ''' Parse the passed in data into a UDF Anchor Volume Structure. Parameters: data - The data to parse. extent - The extent that this descriptor currently lives at. desc_tag - A UDFTa...
[ "def", "parse", "(", "self", ",", "data", ",", "extent", ",", "desc_tag", ")", ":", "# type: (bytes, int, UDFTag) -> None", "if", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'Anchor Volume Structure already initializ...
Parse the passed in data into a UDF Anchor Volume Structure. Parameters: data - The data to parse. extent - The extent that this descriptor currently lives at. desc_tag - A UDFTag object that represents the Descriptor Tag. Returns: Nothing.
[ "Parse", "the", "passed", "in", "data", "into", "a", "UDF", "Anchor", "Volume", "Structure", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/udf.py#L644-L667
clalancette/pycdlib
pycdlib/udf.py
UDFAnchorVolumeStructure.record
def record(self): # type: () -> bytes ''' A method to generate the string representing this UDF Anchor Volume Structure. Parameters: None. Returns: A string representing this UDF Anchor Volume Structure. ''' if not self._initialized: ...
python
def record(self): # type: () -> bytes ''' A method to generate the string representing this UDF Anchor Volume Structure. Parameters: None. Returns: A string representing this UDF Anchor Volume Structure. ''' if not self._initialized: ...
[ "def", "record", "(", "self", ")", ":", "# type: () -> bytes", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'UDF Anchor Volume Descriptor not initialized'", ")", "rec", "=", "struct", ".", "pack", "("...
A method to generate the string representing this UDF Anchor Volume Structure. Parameters: None. Returns: A string representing this UDF Anchor Volume Structure.
[ "A", "method", "to", "generate", "the", "string", "representing", "this", "UDF", "Anchor", "Volume", "Structure", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/udf.py#L669-L687
clalancette/pycdlib
pycdlib/udf.py
UDFAnchorVolumeStructure.new
def new(self): # type: () -> None ''' A method to create a new UDF Anchor Volume Structure. Parameters: None. Returns: Nothing. ''' if self._initialized: raise pycdlibexception.PyCdlibInternalError('UDF Anchor Volume Structure alread...
python
def new(self): # type: () -> None ''' A method to create a new UDF Anchor Volume Structure. Parameters: None. Returns: Nothing. ''' if self._initialized: raise pycdlibexception.PyCdlibInternalError('UDF Anchor Volume Structure alread...
[ "def", "new", "(", "self", ")", ":", "# type: () -> None", "if", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'UDF Anchor Volume Structure already initialized'", ")", "self", ".", "desc_tag", "=", "UDFTag", "(", "...
A method to create a new UDF Anchor Volume Structure. Parameters: None. Returns: Nothing.
[ "A", "method", "to", "create", "a", "new", "UDF", "Anchor", "Volume", "Structure", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/udf.py#L706-L726
clalancette/pycdlib
pycdlib/udf.py
UDFAnchorVolumeStructure.set_extent_location
def set_extent_location(self, new_location, main_vd_extent, reserve_vd_extent): # type: (int, int, int) -> None ''' A method to set a new location for this Anchor Volume Structure. Parameters: new_location - The new extent that this Anchor Volume Structure should be located at....
python
def set_extent_location(self, new_location, main_vd_extent, reserve_vd_extent): # type: (int, int, int) -> None ''' A method to set a new location for this Anchor Volume Structure. Parameters: new_location - The new extent that this Anchor Volume Structure should be located at....
[ "def", "set_extent_location", "(", "self", ",", "new_location", ",", "main_vd_extent", ",", "reserve_vd_extent", ")", ":", "# type: (int, int, int) -> None", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", ...
A method to set a new location for this Anchor Volume Structure. Parameters: new_location - The new extent that this Anchor Volume Structure should be located at. main_vd_extent - The extent containing the main Volume Descriptors. reserve_vd_extent - The extent containing the reserve...
[ "A", "method", "to", "set", "a", "new", "location", "for", "this", "Anchor", "Volume", "Structure", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/udf.py#L728-L746
clalancette/pycdlib
pycdlib/udf.py
UDFTimestamp.parse
def parse(self, data): # type: (bytes) -> None ''' Parse the passed in data into a UDF Timestamp. Parameters: data - The data to parse. Returns: Nothing. ''' if self._initialized: raise pycdlibexception.PyCdlibInternalError('UDF Time...
python
def parse(self, data): # type: (bytes) -> None ''' Parse the passed in data into a UDF Timestamp. Parameters: data - The data to parse. Returns: Nothing. ''' if self._initialized: raise pycdlibexception.PyCdlibInternalError('UDF Time...
[ "def", "parse", "(", "self", ",", "data", ")", ":", "# type: (bytes) -> None", "if", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'UDF Timestamp already initialized'", ")", "(", "tz", ",", "timetype", ",", "self...
Parse the passed in data into a UDF Timestamp. Parameters: data - The data to parse. Returns: Nothing.
[ "Parse", "the", "passed", "in", "data", "into", "a", "UDF", "Timestamp", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/udf.py#L763-L808
clalancette/pycdlib
pycdlib/udf.py
UDFTimestamp.record
def record(self): # type: () -> bytes ''' A method to generate the string representing this UDF Timestamp. Parameters: None. Returns: A string representing this UDF Timestamp. ''' if not self._initialized: raise pycdlibexception.PyCd...
python
def record(self): # type: () -> bytes ''' A method to generate the string representing this UDF Timestamp. Parameters: None. Returns: A string representing this UDF Timestamp. ''' if not self._initialized: raise pycdlibexception.PyCd...
[ "def", "record", "(", "self", ")", ":", "# type: () -> bytes", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'UDF Timestamp not initialized'", ")", "tmp", "=", "(", "(", "1", "<<", "16", ")", "-"...
A method to generate the string representing this UDF Timestamp. Parameters: None. Returns: A string representing this UDF Timestamp.
[ "A", "method", "to", "generate", "the", "string", "representing", "this", "UDF", "Timestamp", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/udf.py#L810-L830
clalancette/pycdlib
pycdlib/udf.py
UDFTimestamp.new
def new(self): # type: () -> None ''' A method to create a new UDF Timestamp. Parameters: None. Returns: Nothing. ''' if self._initialized: raise pycdlibexception.PyCdlibInternalError('UDF Timestamp already initialized') tm ...
python
def new(self): # type: () -> None ''' A method to create a new UDF Timestamp. Parameters: None. Returns: Nothing. ''' if self._initialized: raise pycdlibexception.PyCdlibInternalError('UDF Timestamp already initialized') tm ...
[ "def", "new", "(", "self", ")", ":", "# type: () -> None", "if", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'UDF Timestamp already initialized'", ")", "tm", "=", "time", ".", "time", "(", ")", "local", "=", ...
A method to create a new UDF Timestamp. Parameters: None. Returns: Nothing.
[ "A", "method", "to", "create", "a", "new", "UDF", "Timestamp", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/udf.py#L832-L862
clalancette/pycdlib
pycdlib/udf.py
UDFEntityID.parse
def parse(self, data): # type: (bytes) -> None ''' Parse the passed in data into a UDF Entity ID. Parameters: data - The data to parse. Returns: Nothing. ''' if self._initialized: raise pycdlibexception.PyCdlibInternalError('UDF Enti...
python
def parse(self, data): # type: (bytes) -> None ''' Parse the passed in data into a UDF Entity ID. Parameters: data - The data to parse. Returns: Nothing. ''' if self._initialized: raise pycdlibexception.PyCdlibInternalError('UDF Enti...
[ "def", "parse", "(", "self", ",", "data", ")", ":", "# type: (bytes) -> None", "if", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'UDF Entity ID already initialized'", ")", "(", "self", ".", "flags", ",", "self"...
Parse the passed in data into a UDF Entity ID. Parameters: data - The data to parse. Returns: Nothing.
[ "Parse", "the", "passed", "in", "data", "into", "a", "UDF", "Entity", "ID", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/udf.py#L877-L892
clalancette/pycdlib
pycdlib/udf.py
UDFEntityID.record
def record(self): # type: () -> bytes ''' A method to generate the string representing this UDF Entity ID. Parameters: None. Returns: A string representing this UDF Entity ID. ''' if not self._initialized: raise pycdlibexception.PyCd...
python
def record(self): # type: () -> bytes ''' A method to generate the string representing this UDF Entity ID. Parameters: None. Returns: A string representing this UDF Entity ID. ''' if not self._initialized: raise pycdlibexception.PyCd...
[ "def", "record", "(", "self", ")", ":", "# type: () -> bytes", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'UDF Entity ID not initialized'", ")", "return", "struct", ".", "pack", "(", "self", ".", ...
A method to generate the string representing this UDF Entity ID. Parameters: None. Returns: A string representing this UDF Entity ID.
[ "A", "method", "to", "generate", "the", "string", "representing", "this", "UDF", "Entity", "ID", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/udf.py#L894-L907
clalancette/pycdlib
pycdlib/udf.py
UDFEntityID.new
def new(self, flags=0, identifier=b'', suffix=b''): # type: (int, bytes, bytes) -> None ''' A method to create a new UDF Entity ID. Parameters: flags - The flags to set for this Entity ID. identifier - The identifier to set for this Entity ID. suffix - The suf...
python
def new(self, flags=0, identifier=b'', suffix=b''): # type: (int, bytes, bytes) -> None ''' A method to create a new UDF Entity ID. Parameters: flags - The flags to set for this Entity ID. identifier - The identifier to set for this Entity ID. suffix - The suf...
[ "def", "new", "(", "self", ",", "flags", "=", "0", ",", "identifier", "=", "b''", ",", "suffix", "=", "b''", ")", ":", "# type: (int, bytes, bytes) -> None", "if", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(",...
A method to create a new UDF Entity ID. Parameters: flags - The flags to set for this Entity ID. identifier - The identifier to set for this Entity ID. suffix - The suffix to set for this Entity ID. None. Returns: Nothing.
[ "A", "method", "to", "create", "a", "new", "UDF", "Entity", "ID", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/udf.py#L909-L935
clalancette/pycdlib
pycdlib/udf.py
UDFPrimaryVolumeDescriptor.parse
def parse(self, data, extent, desc_tag): # type: (bytes, int, UDFTag) -> None ''' Parse the passed in data into a UDF Primary Volume Descriptor. Parameters: data - The data to parse. extent - The extent that this descriptor currently lives at. desc_tag - A UDF...
python
def parse(self, data, extent, desc_tag): # type: (bytes, int, UDFTag) -> None ''' Parse the passed in data into a UDF Primary Volume Descriptor. Parameters: data - The data to parse. extent - The extent that this descriptor currently lives at. desc_tag - A UDF...
[ "def", "parse", "(", "self", ",", "data", ",", "extent", ",", "desc_tag", ")", ":", "# type: (bytes, int, UDFTag) -> None", "if", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'UDF Primary Volume Descriptor already ini...
Parse the passed in data into a UDF Primary Volume Descriptor. Parameters: data - The data to parse. extent - The extent that this descriptor currently lives at. desc_tag - A UDFTag object that represents the Descriptor Tag. Returns: Nothing.
[ "Parse", "the", "passed", "in", "data", "into", "a", "UDF", "Primary", "Volume", "Descriptor", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/udf.py#L957-L1011
clalancette/pycdlib
pycdlib/udf.py
UDFPrimaryVolumeDescriptor.record
def record(self): # type: () -> bytes ''' A method to generate the string representing this UDF Primary Volume Descriptor. Parameters: None. Returns: A string representing this UDF Primary Volume Descriptor. ''' if not self._initialized:...
python
def record(self): # type: () -> bytes ''' A method to generate the string representing this UDF Primary Volume Descriptor. Parameters: None. Returns: A string representing this UDF Primary Volume Descriptor. ''' if not self._initialized:...
[ "def", "record", "(", "self", ")", ":", "# type: () -> bytes", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'UDF Primary Volume Descriptor not initialized'", ")", "rec", "=", "struct", ".", "pack", "(...
A method to generate the string representing this UDF Primary Volume Descriptor. Parameters: None. Returns: A string representing this UDF Primary Volume Descriptor.
[ "A", "method", "to", "generate", "the", "string", "representing", "this", "UDF", "Primary", "Volume", "Descriptor", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/udf.py#L1013-L1037
clalancette/pycdlib
pycdlib/udf.py
UDFPrimaryVolumeDescriptor.new
def new(self): # type: () -> None ''' A method to create a new UDF Primary Volume Descriptor. Parameters: None. Returns: Nothing. ''' if self._initialized: raise pycdlibexception.PyCdlibInternalError('UDF Primary Volume Descriptor al...
python
def new(self): # type: () -> None ''' A method to create a new UDF Primary Volume Descriptor. Parameters: None. Returns: Nothing. ''' if self._initialized: raise pycdlibexception.PyCdlibInternalError('UDF Primary Volume Descriptor al...
[ "def", "new", "(", "self", ")", ":", "# type: () -> None", "if", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'UDF Primary Volume Descriptor already initialized'", ")", "self", ".", "desc_tag", "=", "UDFTag", "(", ...
A method to create a new UDF Primary Volume Descriptor. Parameters: None. Returns: Nothing.
[ "A", "method", "to", "create", "a", "new", "UDF", "Primary", "Volume", "Descriptor", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/udf.py#L1056-L1098
clalancette/pycdlib
pycdlib/udf.py
UDFImplementationUseVolumeDescriptorImplementationUse.parse
def parse(self, data): # type: (bytes) -> None ''' Parse the passed in data into a UDF Implementation Use Volume Descriptor Implementation Use field. Parameters: data - The data to parse. Returns: Nothing. ''' if self._initialized: ...
python
def parse(self, data): # type: (bytes) -> None ''' Parse the passed in data into a UDF Implementation Use Volume Descriptor Implementation Use field. Parameters: data - The data to parse. Returns: Nothing. ''' if self._initialized: ...
[ "def", "parse", "(", "self", ",", "data", ")", ":", "# type: (bytes) -> None", "if", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'UDF Implementation Use Volume Descriptor Implementation Use field already initialized'", ")"...
Parse the passed in data into a UDF Implementation Use Volume Descriptor Implementation Use field. Parameters: data - The data to parse. Returns: Nothing.
[ "Parse", "the", "passed", "in", "data", "into", "a", "UDF", "Implementation", "Use", "Volume", "Descriptor", "Implementation", "Use", "field", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/udf.py#L1130-L1151
clalancette/pycdlib
pycdlib/udf.py
UDFImplementationUseVolumeDescriptorImplementationUse.record
def record(self): # type: () -> bytes ''' A method to generate the string representing this UDF Implementation Use Volume Descriptor Implementation Use field. Parameters: None. Returns: A string representing this UDF Implementation Use Volume Descriptor...
python
def record(self): # type: () -> bytes ''' A method to generate the string representing this UDF Implementation Use Volume Descriptor Implementation Use field. Parameters: None. Returns: A string representing this UDF Implementation Use Volume Descriptor...
[ "def", "record", "(", "self", ")", ":", "# type: () -> bytes", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'UDF Implementation Use Volume Descriptor Implementation Use field not initialized'", ")", "return", ...
A method to generate the string representing this UDF Implementation Use Volume Descriptor Implementation Use field. Parameters: None. Returns: A string representing this UDF Implementation Use Volume Descriptor.
[ "A", "method", "to", "generate", "the", "string", "representing", "this", "UDF", "Implementation", "Use", "Volume", "Descriptor", "Implementation", "Use", "field", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/udf.py#L1153-L1169
clalancette/pycdlib
pycdlib/udf.py
UDFImplementationUseVolumeDescriptorImplementationUse.new
def new(self): # type: () -> None ''' A method to create a new UDF Implementation Use Volume Descriptor Implementation Use field. Parameters: None: Returns: Nothing. ''' if self._initialized: raise pycdlibexception.PyCdlibInternalErr...
python
def new(self): # type: () -> None ''' A method to create a new UDF Implementation Use Volume Descriptor Implementation Use field. Parameters: None: Returns: Nothing. ''' if self._initialized: raise pycdlibexception.PyCdlibInternalErr...
[ "def", "new", "(", "self", ")", ":", "# type: () -> None", "if", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'UDF Implementation Use Volume Descriptor Implementation Use field already initialized'", ")", "self", ".", "ch...
A method to create a new UDF Implementation Use Volume Descriptor Implementation Use field. Parameters: None: Returns: Nothing.
[ "A", "method", "to", "create", "a", "new", "UDF", "Implementation", "Use", "Volume", "Descriptor", "Implementation", "Use", "field", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/udf.py#L1171-L1193
clalancette/pycdlib
pycdlib/udf.py
UDFImplementationUseVolumeDescriptor.parse
def parse(self, data, extent, desc_tag): # type: (bytes, int, UDFTag) -> None ''' Parse the passed in data into a UDF Implementation Use Volume Descriptor. Parameters: data - The data to parse. extent - The extent that this descriptor currently lives at. ...
python
def parse(self, data, extent, desc_tag): # type: (bytes, int, UDFTag) -> None ''' Parse the passed in data into a UDF Implementation Use Volume Descriptor. Parameters: data - The data to parse. extent - The extent that this descriptor currently lives at. ...
[ "def", "parse", "(", "self", ",", "data", ",", "extent", ",", "desc_tag", ")", ":", "# type: (bytes, int, UDFTag) -> None", "if", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'UDF Implementation Use Volume Descriptor ...
Parse the passed in data into a UDF Implementation Use Volume Descriptor. Parameters: data - The data to parse. extent - The extent that this descriptor currently lives at. desc_tag - A UDFTag object that represents the Descriptor Tag. Returns: Nothing.
[ "Parse", "the", "passed", "in", "data", "into", "a", "UDF", "Implementation", "Use", "Volume", "Descriptor", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/udf.py#L1210-L1241
clalancette/pycdlib
pycdlib/udf.py
UDFImplementationUseVolumeDescriptor.new
def new(self): # type: () -> None ''' A method to create a new UDF Implementation Use Volume Descriptor. Parameters: None: Returns: Nothing. ''' if self._initialized: raise pycdlibexception.PyCdlibInternalError('UDF Implementation Us...
python
def new(self): # type: () -> None ''' A method to create a new UDF Implementation Use Volume Descriptor. Parameters: None: Returns: Nothing. ''' if self._initialized: raise pycdlibexception.PyCdlibInternalError('UDF Implementation Us...
[ "def", "new", "(", "self", ")", ":", "# type: () -> None", "if", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'UDF Implementation Use Volume Descriptor already initialized'", ")", "self", ".", "desc_tag", "=", "UDFTag...
A method to create a new UDF Implementation Use Volume Descriptor. Parameters: None: Returns: Nothing.
[ "A", "method", "to", "create", "a", "new", "UDF", "Implementation", "Use", "Volume", "Descriptor", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/udf.py#L1281-L1305
clalancette/pycdlib
pycdlib/udf.py
UDFPartitionHeaderDescriptor.parse
def parse(self, data): # type: (bytes) -> None ''' Parse the passed in data into a UDF Partition Header Descriptor. Parameters: data - The data to parse. Returns: Nothing. ''' if self._initialized: raise pycdlibexception.PyCdlibInter...
python
def parse(self, data): # type: (bytes) -> None ''' Parse the passed in data into a UDF Partition Header Descriptor. Parameters: data - The data to parse. Returns: Nothing. ''' if self._initialized: raise pycdlibexception.PyCdlibInter...
[ "def", "parse", "(", "self", ",", "data", ")", ":", "# type: (bytes) -> None", "if", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'UDF Partition Header Descriptor already initialized'", ")", "(", "unalloc_table_length",...
Parse the passed in data into a UDF Partition Header Descriptor. Parameters: data - The data to parse. Returns: Nothing.
[ "Parse", "the", "passed", "in", "data", "into", "a", "UDF", "Partition", "Header", "Descriptor", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/udf.py#L1336-L1375
clalancette/pycdlib
pycdlib/udf.py
UDFPartitionVolumeDescriptor.parse
def parse(self, data, extent, desc_tag): # type: (bytes, int, UDFTag) -> None ''' Parse the passed in data into a UDF Partition Volume Descriptor. Parameters: data - The data to parse. extent - The extent that this descriptor currently lives at. desc_tag - A U...
python
def parse(self, data, extent, desc_tag): # type: (bytes, int, UDFTag) -> None ''' Parse the passed in data into a UDF Partition Volume Descriptor. Parameters: data - The data to parse. extent - The extent that this descriptor currently lives at. desc_tag - A U...
[ "def", "parse", "(", "self", ",", "data", ",", "extent", ",", "desc_tag", ")", ":", "# type: (bytes, int, UDFTag) -> None", "if", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'UDF Partition Volume Descriptor already i...
Parse the passed in data into a UDF Partition Volume Descriptor. Parameters: data - The data to parse. extent - The extent that this descriptor currently lives at. desc_tag - A UDFTag object that represents the Descriptor Tag. Returns: Nothing.
[ "Parse", "the", "passed", "in", "data", "into", "a", "UDF", "Partition", "Volume", "Descriptor", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/udf.py#L1425-L1460
clalancette/pycdlib
pycdlib/udf.py
UDFPartitionVolumeDescriptor.record
def record(self): # type: () -> bytes ''' A method to generate the string representing this UDF Partition Volume Descriptor. Parameters: None. Returns: A string representing this UDF Partition Volume Descriptor. ''' if not self._initiali...
python
def record(self): # type: () -> bytes ''' A method to generate the string representing this UDF Partition Volume Descriptor. Parameters: None. Returns: A string representing this UDF Partition Volume Descriptor. ''' if not self._initiali...
[ "def", "record", "(", "self", ")", ":", "# type: () -> bytes", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'UDF Partition Volume Descriptor not initialized'", ")", "rec", "=", "struct", ".", "pack", ...
A method to generate the string representing this UDF Partition Volume Descriptor. Parameters: None. Returns: A string representing this UDF Partition Volume Descriptor.
[ "A", "method", "to", "generate", "the", "string", "representing", "this", "UDF", "Partition", "Volume", "Descriptor", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/udf.py#L1462-L1483
clalancette/pycdlib
pycdlib/udf.py
UDFPartitionVolumeDescriptor.new
def new(self): # type: () -> None ''' A method to create a new UDF Partition Volume Descriptor. Parameters: None. Returns: Nothing. ''' if self._initialized: raise pycdlibexception.PyCdlibInternalError('UDF Partition Volume Descripto...
python
def new(self): # type: () -> None ''' A method to create a new UDF Partition Volume Descriptor. Parameters: None. Returns: Nothing. ''' if self._initialized: raise pycdlibexception.PyCdlibInternalError('UDF Partition Volume Descripto...
[ "def", "new", "(", "self", ")", ":", "# type: () -> None", "if", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'UDF Partition Volume Descriptor already initialized'", ")", "self", ".", "desc_tag", "=", "UDFTag", "(",...
A method to create a new UDF Partition Volume Descriptor. Parameters: None. Returns: Nothing.
[ "A", "method", "to", "create", "a", "new", "UDF", "Partition", "Volume", "Descriptor", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/udf.py#L1503-L1538
clalancette/pycdlib
pycdlib/udf.py
UDFPartitionVolumeDescriptor.set_start_location
def set_start_location(self, new_location): # type: (int) -> None ''' A method to set the location of the start of the partition. Parameters: new_location - The new extent the UDF partition should start at. Returns: Nothing. ''' if not self._ini...
python
def set_start_location(self, new_location): # type: (int) -> None ''' A method to set the location of the start of the partition. Parameters: new_location - The new extent the UDF partition should start at. Returns: Nothing. ''' if not self._ini...
[ "def", "set_start_location", "(", "self", ",", "new_location", ")", ":", "# type: (int) -> None", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'UDF Partition Volume Descriptor not initialized'", ")", "self"...
A method to set the location of the start of the partition. Parameters: new_location - The new extent the UDF partition should start at. Returns: Nothing.
[ "A", "method", "to", "set", "the", "location", "of", "the", "start", "of", "the", "partition", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/udf.py#L1555-L1567
clalancette/pycdlib
pycdlib/udf.py
UDFPartitionMap.parse
def parse(self, data): # type: (bytes) -> None ''' Parse the passed in data into a UDF Partition Map. Parameters: data - The data to parse. Returns: Nothing. ''' if self._initialized: raise pycdlibexception.PyCdlibInternalError('UDF ...
python
def parse(self, data): # type: (bytes) -> None ''' Parse the passed in data into a UDF Partition Map. Parameters: data - The data to parse. Returns: Nothing. ''' if self._initialized: raise pycdlibexception.PyCdlibInternalError('UDF ...
[ "def", "parse", "(", "self", ",", "data", ")", ":", "# type: (bytes) -> None", "if", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'UDF Partition Map already initialized'", ")", "(", "map_type", ",", "map_length", ...
Parse the passed in data into a UDF Partition Map. Parameters: data - The data to parse. Returns: Nothing.
[ "Parse", "the", "passed", "in", "data", "into", "a", "UDF", "Partition", "Map", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/udf.py#L1582-L1605
clalancette/pycdlib
pycdlib/udf.py
UDFPartitionMap.new
def new(self): # type: () -> None ''' A method to create a new UDF Partition Map. Parameters: None. Returns: Nothing. ''' if self._initialized: raise pycdlibexception.PyCdlibInternalError('UDF Partition Map already initialized') ...
python
def new(self): # type: () -> None ''' A method to create a new UDF Partition Map. Parameters: None. Returns: Nothing. ''' if self._initialized: raise pycdlibexception.PyCdlibInternalError('UDF Partition Map already initialized') ...
[ "def", "new", "(", "self", ")", ":", "# type: () -> None", "if", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'UDF Partition Map already initialized'", ")", "self", ".", "part_num", "=", "0", "# FIXME: we should let...
A method to create a new UDF Partition Map. Parameters: None. Returns: Nothing.
[ "A", "method", "to", "create", "a", "new", "UDF", "Partition", "Map", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/udf.py#L1622-L1637
clalancette/pycdlib
pycdlib/udf.py
UDFLongAD.parse
def parse(self, data): # type: (bytes) -> None ''' Parse the passed in data into a UDF Long AD. Parameters: data - The data to parse. Returns: Nothing. ''' if self._initialized: raise pycdlibexception.PyCdlibInternalError('UDF Long A...
python
def parse(self, data): # type: (bytes) -> None ''' Parse the passed in data into a UDF Long AD. Parameters: data - The data to parse. Returns: Nothing. ''' if self._initialized: raise pycdlibexception.PyCdlibInternalError('UDF Long A...
[ "def", "parse", "(", "self", ",", "data", ")", ":", "# type: (bytes) -> None", "if", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'UDF Long Allocation descriptor already initialized'", ")", "(", "self", ".", "extent...
Parse the passed in data into a UDF Long AD. Parameters: data - The data to parse. Returns: Nothing.
[ "Parse", "the", "passed", "in", "data", "into", "a", "UDF", "Long", "AD", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/udf.py#L1653-L1668
clalancette/pycdlib
pycdlib/udf.py
UDFLongAD.record
def record(self): # type: () -> bytes ''' A method to generate the string representing this UDF Long AD. Parameters: None. Returns: A string representing this UDF Long AD. ''' if not self._initialized: raise pycdlibexception.PyCdlibI...
python
def record(self): # type: () -> bytes ''' A method to generate the string representing this UDF Long AD. Parameters: None. Returns: A string representing this UDF Long AD. ''' if not self._initialized: raise pycdlibexception.PyCdlibI...
[ "def", "record", "(", "self", ")", ":", "# type: () -> bytes", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'UDF Long AD not initialized'", ")", "return", "struct", ".", "pack", "(", "self", ".", ...
A method to generate the string representing this UDF Long AD. Parameters: None. Returns: A string representing this UDF Long AD.
[ "A", "method", "to", "generate", "the", "string", "representing", "this", "UDF", "Long", "AD", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/udf.py#L1670-L1684
clalancette/pycdlib
pycdlib/udf.py
UDFLongAD.new
def new(self, length, blocknum): # type: (int, int) -> None ''' A method to create a new UDF Long AD. Parameters: None. Returns: Nothing. ''' if self._initialized: raise pycdlibexception.PyCdlibInternalError('UDF Long AD already init...
python
def new(self, length, blocknum): # type: (int, int) -> None ''' A method to create a new UDF Long AD. Parameters: None. Returns: Nothing. ''' if self._initialized: raise pycdlibexception.PyCdlibInternalError('UDF Long AD already init...
[ "def", "new", "(", "self", ",", "length", ",", "blocknum", ")", ":", "# type: (int, int) -> None", "if", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'UDF Long AD already initialized'", ")", "self", ".", "extent_l...
A method to create a new UDF Long AD. Parameters: None. Returns: Nothing.
[ "A", "method", "to", "create", "a", "new", "UDF", "Long", "AD", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/udf.py#L1686-L1704
clalancette/pycdlib
pycdlib/udf.py
UDFLongAD.set_extent_location
def set_extent_location(self, new_location, tag_location): # type: (int, int) -> None ''' A method to set the location fields of this UDF Long AD. Parameters: new_location - The new relative extent that this UDF Long AD references. tag_location - The new absolute exten...
python
def set_extent_location(self, new_location, tag_location): # type: (int, int) -> None ''' A method to set the location fields of this UDF Long AD. Parameters: new_location - The new relative extent that this UDF Long AD references. tag_location - The new absolute exten...
[ "def", "set_extent_location", "(", "self", ",", "new_location", ",", "tag_location", ")", ":", "# type: (int, int) -> None", "if", "not", "self", ".", "_initialized", ":", "raise", "pycdlibexception", ".", "PyCdlibInternalError", "(", "'UDF Long AD not initialized'", ")...
A method to set the location fields of this UDF Long AD. Parameters: new_location - The new relative extent that this UDF Long AD references. tag_location - The new absolute extent that this UDF Long AD references. Returns: Nothing.
[ "A", "method", "to", "set", "the", "location", "fields", "of", "this", "UDF", "Long", "AD", "." ]
train
https://github.com/clalancette/pycdlib/blob/1e7b77a809e905d67dc71e12d70e850be26b6233/pycdlib/udf.py#L1706-L1721