1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723
|
<html><head><title>Python: module pycdlib.pycdlib</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
</head><body bgcolor="#f0f0f8">
<table width="100%" cellspacing="0" cellpadding="2" border="0" summary="heading">
<tr bgcolor="#7799ee">
<td valign="bottom"> <br/>
<font color="#ffffff" face="helvetica, arial"> <br/><big><big><strong><a href="pycdlib.html"><font color="#ffffff">pycdlib</font></a>.pycdlib</strong></big></big></font></td><td align="right" valign="bottom"><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br/></font></td></tr></table>
<p><tt>Main <a href="#PyCdlib">PyCdlib</a> class and support classes and utilities.</tt></p>
<p>
</p><p>
</p><table width="100%" cellspacing="0" cellpadding="2" border="0" summary="section">
<tr bgcolor="#ee77aa">
<td colspan="3" valign="bottom"> <br/>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
<tr><td bgcolor="#ee77aa"><tt>      </tt></td><td> </td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="builtins.html#object">builtins.object</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="pycdlib.pycdlib.html#PyCdlib">PyCdlib</a>
</font></dt></dl>
</dd>
</dl>
<p>
</p><table width="100%" cellspacing="0" cellpadding="2" border="0" summary="section">
<tr bgcolor="#ffc8d8">
<td colspan="3" valign="bottom"> <br/>
<font color="#000000" face="helvetica, arial"><a name="PyCdlib">class <strong>PyCdlib</strong></a>(<a href="builtins.html#object">builtins.object</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan="2"><tt>   </tt></td>
<td colspan="2"><tt><a href="#PyCdlib">PyCdlib</a>(always_consistent=False)<br/>
 <br/>
The main class for manipulating ISOs.<br/> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br/>
<dl><dt><a name="PyCdlib-__init__"><strong>__init__</strong></a>(self, always_consistent=False)</dt><dd><tt>Initialize self.  See help(type(self)) for accurate signature.</tt></dd></dl>
<dl><dt><a name="PyCdlib-add_directory"><strong>add_directory</strong></a>(self, iso_path=None, rr_name=None, joliet_path=None, file_mode=None, udf_path=None)</dt><dd><tt>Add a directory to the ISO.  At least one of an iso_path, joliet_path,<br/>
or udf_path must be provided.  Providing joliet_path on a non-Joliet<br/>
ISO, or udf_path on a non-UDF ISO, is an error.  If the ISO contains<br/>
Rock Ridge, then a Rock Ridge name must be provided.<br/>
 <br/>
Parameters:<br/>
 iso_path - The ISO9660 absolute path to use for the directory.<br/>
 rr_name - The Rock Ridge name to use for the directory.<br/>
 joliet_path - The Joliet absolute path to use for the directory.<br/>
 file_mode - The POSIX file mode to use for the directory.  This only<br/>
             applies for Rock Ridge ISOs.<br/>
 udf_path - The UDF absolute path to use for the directory.<br/>
Returns:<br/>
 Nothing.</tt></dd></dl>
<dl><dt><a name="PyCdlib-add_eltorito"><strong>add_eltorito</strong></a>(self, bootfile_path, bootcatfile=None, rr_bootcatname=None, joliet_bootcatfile=None, boot_load_size=None, platform_id=0, boot_info_table=False, efi=False, media_name='noemul', bootable=True, boot_load_seg=0, udf_bootcatfile=None)</dt><dd><tt>Add an El Torito Boot Record, and associated files, to the ISO.  The<br/>
file that will be used as the bootfile must be passed into this function<br/>
and must already be present on the ISO.<br/>
 <br/>
Parameters:<br/>
 bootfile_path - The file to use as the boot file; it must already<br/>
                 exist on this ISO.<br/>
 bootcatfile - The fake file to use as the boot catalog entry; set to<br/>
               BOOT.CAT;1 by default.<br/>
 rr_bootcatname - The Rock Ridge name for the fake file to use as the<br/>
                  boot catalog entry; set to 'boot.cat' by default.<br/>
 joliet_bootcatfile - The Joliet name for the fake file to use as the<br/>
                      boot catalog entry; set to 'boot.cat' by default.<br/>
 boot_load_size - The number of sectors to use for the boot entry; if<br/>
                  set to None (the default), the number of sectors will<br/>
                  be calculated.<br/>
 platform_id - The platform ID to set for the El Torito entry; 0 is for<br/>
               x86, 1 is for Power PC, 2 is for Mac, and 0xef is for<br/>
               UEFI.  0 is the default.<br/>
 boot_info_table - Whether to add a boot info table to the ISO.  The<br/>
                   default is False.<br/>
 efi - Whether this is an EFI entry for El Torito.  The default is False.<br/>
 media_name - The name of the media type, one of 'noemul', 'floppy', or 'hdemul'.<br/>
 bootable - Whether the boot media is bootable.  The default is True.<br/>
 boot_load_seg - The load segment address of the boot image.<br/>
Returns:<br/>
 Nothing.</tt></dd></dl>
<dl><dt><a name="PyCdlib-add_file"><strong>add_file</strong></a>(self, filename, iso_path=None, rr_name=None, joliet_path=None, file_mode=None, udf_path=None)</dt><dd><tt>Add a file to the ISO.  If the ISO is a Rock Ridge one, then a Rock<br/>
Ridge name must also be provided.  If the ISO is a Joliet one, then a<br/>
Joliet path may also be provided; while it is optional to do so, it is<br/>
highly recommended.<br/>
 <br/>
Parameters:<br/>
 filename - The filename to use for the data contents for the new file.<br/>
 iso_path - The ISO9660 absolute path to the file destination on the ISO.<br/>
 rr_name - The Rock Ridge name of the file destination on the ISO.<br/>
 joliet_path - The Joliet absolute path to the file destination on the ISO.<br/>
 file_mode - The POSIX file_mode to apply to this file.  This only<br/>
             applies if this is a Rock Ridge ISO.  If this is None (the<br/>
             default), the permissions from the original file are used.<br/>
 udf_path - The UDF name of the file destination on the ISO.<br/>
Returns:<br/>
 Nothing.</tt></dd></dl>
<dl><dt><a name="PyCdlib-add_fp"><strong>add_fp</strong></a>(self, fp, length, iso_path=None, rr_name=None, joliet_path=None, file_mode=None, udf_path=None)</dt><dd><tt>Add a file to the ISO.  If the ISO is a Rock Ridge one, then a Rock<br/>
Ridge name must also be provided.  If the ISO is a Joliet one, then a<br/>
Joliet path may also be provided; while it is optional to do so, it is<br/>
highly recommended.  Note that the caller must ensure that 'fp' remains<br/>
open for the lifetime of the <a href="#PyCdlib">PyCdlib</a> <a href="builtins.html#object">object</a>, as the <a href="#PyCdlib">PyCdlib</a> class uses<br/>
the file descriptor internally when writing (mastering) the ISO.  To<br/>
have <a href="#PyCdlib">PyCdlib</a> manage this automatically, use 'add_file' instead.<br/>
 <br/>
Parameters:<br/>
 fp - The file <a href="builtins.html#object">object</a> to use for the contents of the new file.<br/>
 length - The length of the data for the new file.<br/>
 iso_path - The ISO9660 absolute path to the file destination on the ISO.<br/>
 rr_name - The Rock Ridge name of the file destination on the ISO.<br/>
 joliet_path - The Joliet absolute path to the file destination on the ISO.<br/>
 file_mode - The POSIX file_mode to apply to this file.  This only<br/>
             applies if this is a Rock Ridge ISO.  If this is None (the<br/>
             default), the permissions from the original file are used.<br/>
 udf_path - The UDF name of the file destination on the ISO.<br/>
Returns:<br/>
 Nothing.</tt></dd></dl>
<dl><dt><a name="PyCdlib-add_hard_link"><strong>add_hard_link</strong></a>(self, **kwargs)</dt><dd><tt>Add a hard link to the ISO.  Hard links are alternate names for the<br/>
same file contents that don't take up any additional space on the the<br/>
ISO.  This API can be used to create hard links between two files on<br/>
the ISO9660 filesystem, between two files on the Joliet filesystem, or<br/>
between a file on the ISO9660 filesystem and the Joliet filesystem.<br/>
In all cases, exactly one old path must be specified, and exactly one<br/>
new path must be specified.<br/>
Note that this is an advanced API, so using it in combination with the<br/>
higher-level APIs (like <a href="#PyCdlib-rm_file">rm_file</a>()) may result in unexpected behavior.<br/>
Once this API has been used, this API and <a href="#PyCdlib-rm_hard_link">rm_hard_link</a>() should be<br/>
preferred over <a href="#PyCdlib-add_file">add_file</a>() and <a href="#PyCdlib-rm_file">rm_file</a>(), respectively.<br/>
 <br/>
Parameters:<br/>
 iso_old_path - The old path on the ISO9660 filesystem to link from.<br/>
 iso_new_path - The new path on the ISO9660 filesystem to link to.<br/>
 joliet_old_path - The old path on the Joliet filesystem to link from.<br/>
 joliet_new_path - The new path on the Joliet filesystem to link to.<br/>
 rr_name - The Rock Ridge name to use for the new file if this is a Rock<br/>
           Ridge ISO and the new path is on the ISO9660 filesystem.<br/>
 boot_catalog_old - Use the El Torito boot catalog as the old path.<br/>
 udf_old_path - The old path on the UDF filesystem to link from.<br/>
 udf_new_path - The new path on the UDF filesystem to link to.<br/>
Returns:<br/>
 Nothing.</tt></dd></dl>
<dl><dt><a name="PyCdlib-add_isohybrid"><strong>add_isohybrid</strong></a>(self, part_entry=1, mbr_id=None, part_offset=0, geometry_sectors=32, geometry_heads=64, part_type=None, mac=False, efi=None)</dt><dd><tt>Make an ISO a 'hybrid', which means that it can be booted either from a<br/>
CD or from more traditional media (like a USB stick).  This requires<br/>
that the ISO already have El Torito, and will use the El Torito boot<br/>
file as a bootable image.  That image must contain a certain signature<br/>
in order to work as a hybrid (if using syslinux, this generally means<br/>
the isohdpfx.bin files).<br/>
 <br/>
Parameters:<br/>
 part_entry - The partition entry to use; one by default.<br/>
 mbr_id - The mbr_id to use.  If set to None (the default), a random one<br/>
          will be generated.<br/>
 part_offset - The partition offset to use; zero by default.<br/>
 geometry_sectors - The number of sectors to assign; thirty-two by<br/>
                    default.<br/>
 geometry_heads - The number of heads to assign; sixty-four by default.<br/>
 part_type - The partition type to assign; twenty-three by default, but<br/>
             will automatically be set to 0 if mac or efi are True.<br/>
 mac - Add support for Mac; False by default.<br/>
 efi - Add support for EFI; False by default, but will automatically<br/>
       be set to True if mac is True.<br/>
Returns:<br/>
 Nothing.</tt></dd></dl>
<dl><dt><a name="PyCdlib-add_joliet_directory"><strong>add_joliet_directory</strong></a>(self, joliet_path)</dt><dd><tt>(deprecated) Add a directory to the Joliet portion of the ISO.  Since<br/>
Joliet occupies a completely different context than ISO9660, this<br/>
method can be invoked to create a completely different directory<br/>
structure in the Joliet context, though that is generally not advised.<br/>
It is recommended to use the 'joliet_path' argument of the<br/>
'add_directory' instead of this method.<br/>
 <br/>
Parameters:<br/>
 joliet_path - The Joliet directory to create.<br/>
Returns:<br/>
 Nothing.</tt></dd></dl>
<dl><dt><a name="PyCdlib-add_symlink"><strong>add_symlink</strong></a>(self, symlink_path=None, rr_symlink_name=None, rr_path=None, joliet_path=None, udf_symlink_path=None, udf_target=None)</dt><dd><tt>Add a symlink from rr_symlink_name to the rr_path.  The ISO must have<br/>
either Rock Ridge or UDF support (or both).<br/>
 <br/>
Parameters:<br/>
 symlink_path - The ISO9660 path of the symlink itself on the ISO.<br/>
 rr_symlink_name - The Rock Ridge name of the symlink itself on the ISO.<br/>
 rr_path - The path that the symlink points to on the Rock Ridge part<br/>
           of the ISO.<br/>
 joliet_path - The Joliet path of the symlink (if this ISO has Joliet).<br/>
 udf_symlink_path - The UDF path of the symlink itself on the ISO.<br/>
 udf_target - The UDF name of the entry on the ISO that the symlink<br/>
              points to.<br/>
Returns:<br/>
 Nothing.</tt></dd></dl>
<dl><dt><a name="PyCdlib-clear_hidden"><strong>clear_hidden</strong></a>(self, iso_path=None, rr_path=None, joliet_path=None)</dt><dd><tt>Clear the ISO9660 hidden attribute on a file or directory.  This will<br/>
cause the file or directory to show up when listing entries on the ISO.<br/>
Exactly one of iso_path, rr_path, or joliet_path must be specified.<br/>
 <br/>
Parameters:<br/>
 iso_path - The path on the ISO to clear the hidden bit from.<br/>
 rr_path - The Rock Ridge path on the ISO to clear the hidden bit from.<br/>
 joliet_path - The Joliet path on the ISO to clear the hidden bit from.<br/>
Returns:<br/>
 Nothing.</tt></dd></dl>
<dl><dt><a name="PyCdlib-close"><strong>close</strong></a>(self)</dt><dd><tt>Close the <a href="#PyCdlib">PyCdlib</a> <a href="builtins.html#object">object</a>, and re-initialize the <a href="builtins.html#object">object</a> to the defaults.<br/>
The <a href="builtins.html#object">object</a> can then be re-used for manipulation of another ISO.<br/>
 <br/>
Parameters:<br/>
 None.<br/>
Returns:<br/>
 Nothing.</tt></dd></dl>
<dl><dt><a name="PyCdlib-duplicate_pvd"><strong>duplicate_pvd</strong></a>(self)</dt><dd><tt>Add a duplicate PVD to the ISO.  This is a mostly useless feature<br/>
allowed by Ecma-119 to have duplicate PVDs to avoid possible corruption.<br/>
 <br/>
Parameters:<br/>
 None.<br/>
Returns:<br/>
 Nothing.</tt></dd></dl>
<dl><dt><a name="PyCdlib-file_mode"><strong>file_mode</strong></a>(self, **kwargs)</dt><dd><tt>Get the POSIX file mode of the file if is a Rock Ridge file.<br/>
 <br/>
Parameters:<br/>
 iso_path - The absolute ISO path to the file on the ISO.<br/>
 rr_path - The absolute Rock Ridge path to the file on the ISO.<br/>
 joliet_path - The absolute Joliet path to the file on the ISO.<br/>
 udf_path - The absolute UDF path to the file on the ISO.<br/>
Returns:<br/>
 An integer representing the POSIX file mode of the file if it is Rock<br/>
 Ridge, or None otherwise.</tt></dd></dl>
<dl><dt><a name="PyCdlib-force_consistency"><strong>force_consistency</strong></a>(self)</dt><dd><tt>Make sure the ISO <a href="builtins.html#object">object</a> is fully consistent.  <a href="#PyCdlib">PyCdlib</a> typically delays<br/>
doing work until it is necessary, and this detail is usually hidden<br/>
from users.  However, there are times that a user may want a fully<br/>
consistent view of the ISO without calling one of the methods that<br/>
forces consistency.  This method allows the user to force a consistent<br/>
view of this <a href="builtins.html#object">object</a>.<br/>
 <br/>
Parameters:<br/>
 None.<br/>
Returns:<br/>
 Nothing.</tt></dd></dl>
<dl><dt><a name="PyCdlib-full_path_from_dirrecord"><strong>full_path_from_dirrecord</strong></a>(self, rec, rockridge=False)</dt><dd><tt>Get the absolute path of a directory record.<br/>
 <br/>
Parameters:<br/>
 rec - The directory record to get the full path for.<br/>
 rockridge - Whether to get the rock ridge full path.<br/>
Returns:<br/>
 A string representing the absolute path to the file on the ISO.</tt></dd></dl>
<dl><dt><a name="PyCdlib-get_and_write"><strong>get_and_write</strong></a>(self, iso_path, local_path, blocksize=8192)</dt><dd><tt>(deprecated) Fetch a single file from the ISO and write it out to the<br/>
specified file.  Note that this will overwrite the contents of the local<br/>
file if it already exists.  Also note that 'iso_path' must be an<br/>
absolute path to the file.  Finally, the 'iso_path' can be an ISO9660<br/>
path, a Rock Ridge path, or a Joliet path.  In the case of ambiguity,<br/>
the Joliet path is tried first, followed by the ISO9660 path, followed<br/>
by the Rock Ridge path.  It is recommended to use the get_file_from_iso<br/>
API instead to resolve this ambiguity.<br/>
 <br/>
Parameters:<br/>
 iso_path - The absolute path to the file to get data from.<br/>
 local_path - The local filename to write the contents to.<br/>
 blocksize - The blocksize to use when copying data; the default is 8192.<br/>
Returns:<br/>
 Nothing.</tt></dd></dl>
<dl><dt><a name="PyCdlib-get_and_write_fp"><strong>get_and_write_fp</strong></a>(self, iso_path, outfp, blocksize=8192)</dt><dd><tt>(deprecated) Fetch a single file from the ISO and write it out to the<br/>
file <a href="builtins.html#object">object</a>.  Note that 'iso_path' must be an absolute path to the file.<br/>
Also note that the 'iso_path' can be an ISO9660 path, a Rock Ridge path,<br/>
or a Joliet path.  In the case of ambiguity, the Joliet path is tried<br/>
first, followed by the ISO9660 path, followed by the Rock Ridge path.<br/>
It is recommend to use the get_file_from_iso_fp API instead to resolve<br/>
this ambiguity.<br/>
 <br/>
Parameters:<br/>
 iso_path - The absolute path to the file to get data from.<br/>
 outfp - The file <a href="builtins.html#object">object</a> to write data to.<br/>
 blocksize - The blocksize to use when copying data; the default is 8192.<br/>
Returns:<br/>
 Nothing.</tt></dd></dl>
<dl><dt><a name="PyCdlib-get_entry"><strong>get_entry</strong></a>(self, iso_path, joliet=False)</dt><dd><tt>(deprecated) Get the directory record for a particular path.  It is<br/>
recommended to use the 'get_record' API instead.<br/>
 <br/>
Parameters:<br/>
 iso_path - The path on the ISO to look up information for.<br/>
 joliet - Whether to look for the path in the Joliet portion of the ISO.<br/>
Returns:<br/>
 A dr.DirectoryRecord <a href="builtins.html#object">object</a> representing the path.</tt></dd></dl>
<dl><dt><a name="PyCdlib-get_file_from_iso"><strong>get_file_from_iso</strong></a>(self, local_path, **kwargs)</dt><dd><tt>Fetch a single file from the ISO and write it out to a local file.<br/>
 <br/>
Parameters:<br/>
 local_path - The local file to write to.<br/>
 blocksize - The number of bytes in each transfer.<br/>
 iso_path - The absolute ISO9660 path to lookup on the ISO (exclusive<br/>
            with rr_path, joliet_path, and udf_path).<br/>
 rr_path - The absolute Rock Ridge path to lookup on the ISO (exclusive<br/>
           with iso_path, joliet_path, and udf_path).<br/>
 joliet_path - The absolute Joliet path to lookup on the ISO (exclusive<br/>
               with iso_path, rr_path, and udf_path).<br/>
 udf_path - The absolute UDF path to lookup on the ISO (exclusive with<br/>
            iso_path, rr_path, and joliet_path).<br/>
Returns:<br/>
 Nothing.</tt></dd></dl>
<dl><dt><a name="PyCdlib-get_file_from_iso_fp"><strong>get_file_from_iso_fp</strong></a>(self, outfp, **kwargs)</dt><dd><tt>Fetch a single file from the ISO and write it out to the file <a href="builtins.html#object">object</a>.<br/>
 <br/>
Parameters:<br/>
 outfp - The file <a href="builtins.html#object">object</a> to write data to.<br/>
 blocksize - The number of bytes in each transfer.<br/>
 iso_path - The absolute ISO9660 path to lookup on the ISO (exclusive<br/>
            with rr_path, joliet_path, and udf_path).<br/>
 rr_path - The absolute Rock Ridge path to lookup on the ISO (exclusive<br/>
           with iso_path, joliet_path, and udf_path).<br/>
 joliet_path - The absolute Joliet path to lookup on the ISO (exclusive<br/>
               with iso_path, rr_path, and udf_path).<br/>
 udf_path - The absolute UDF path to lookup on the ISO (exclusive with<br/>
            iso_path, rr_path, and joliet_path).<br/>
Returns:<br/>
 Nothing.</tt></dd></dl>
<dl><dt><a name="PyCdlib-get_iso9660_facade"><strong>get_iso9660_facade</strong></a>(self)</dt><dd><tt>Return a 'facade' that simplifies some of the complexities of the<br/>
<a href="#PyCdlib">PyCdlib</a> class, while giving up some of the full power.  This facade<br/>
only allows manipulation of the ISO9660 portions of the ISO.<br/>
 <br/>
Parameters:<br/>
 None.<br/>
Returns:<br/>
 A PyCdlibISO9660 <a href="builtins.html#object">object</a> that can be used to interact with the ISO.</tt></dd></dl>
<dl><dt><a name="PyCdlib-get_joliet_facade"><strong>get_joliet_facade</strong></a>(self)</dt><dd><tt>Return a 'facade' that simplifies some of the complexities of the<br/>
<a href="#PyCdlib">PyCdlib</a> class, while giving up some of the full power.  This facade<br/>
only allows manipulation of the Joliet portions of the ISO.<br/>
 <br/>
Parameters:<br/>
 None.<br/>
Returns:<br/>
 A PyCdlibJoliet <a href="builtins.html#object">object</a> that can be used to interact with the ISO.</tt></dd></dl>
<dl><dt><a name="PyCdlib-get_record"><strong>get_record</strong></a>(self, **kwargs)</dt><dd><tt>Get the directory record for a particular path.<br/>
 <br/>
Parameters:<br/>
 iso_path - The absolute path on the ISO9660 filesystem to get the<br/>
            record for.<br/>
 rr_path - The absolute path on the Rock Ridge filesystem to get the<br/>
           record for.<br/>
 joliet_path - The absolute path on the Joliet filesystem to get the<br/>
               record for.<br/>
 udf_path - The absolute path on the UDF filesystem to get the record<br/>
            for.<br/>
Returns:<br/>
 An <a href="builtins.html#object">object</a> that represents the path.  This may be a dr.DirectoryRecord<br/>
 <a href="builtins.html#object">object</a> (in the cases of iso_path, rr_path, or joliet_path), or a<br/>
 udf.UDFFileEntry <a href="builtins.html#object">object</a> (in the case of udf_path).</tt></dd></dl>
<dl><dt><a name="PyCdlib-get_rock_ridge_facade"><strong>get_rock_ridge_facade</strong></a>(self)</dt><dd><tt>Return a 'facade' that simplifies some of the complexities of the<br/>
<a href="#PyCdlib">PyCdlib</a> class, while giving up some of the full power.  This facade<br/>
only allows manipulation of the Rock Ridge portions of the ISO.<br/>
 <br/>
Parameters:<br/>
 None.<br/>
Returns:<br/>
 A PyCdlibRockRidge <a href="builtins.html#object">object</a> that can be used to interact with the ISO.</tt></dd></dl>
<dl><dt><a name="PyCdlib-get_udf_facade"><strong>get_udf_facade</strong></a>(self)</dt><dd><tt>Return a 'facade' that simplifies some of the complexities of the<br/>
<a href="#PyCdlib">PyCdlib</a> class, while giving up some of the full power.  This facade<br/>
only allows manipulation of the UDF portions of the ISO.<br/>
 <br/>
Parameters:<br/>
 None.<br/>
Returns:<br/>
 A PyCdlibUDF <a href="builtins.html#object">object</a> that can be used to interact with the ISO.</tt></dd></dl>
<dl><dt><a name="PyCdlib-has_joliet"><strong>has_joliet</strong></a>(self)</dt><dd><tt>Returns whether this ISO has Joliet extensions.<br/>
 <br/>
Parameters:<br/>
 None.<br/>
Returns:<br/>
 True if this ISO has Joliet, False otherwise.</tt></dd></dl>
<dl><dt><a name="PyCdlib-has_rock_ridge"><strong>has_rock_ridge</strong></a>(self)</dt><dd><tt>Returns whether this ISO has Rock Ridge extensions.<br/>
 <br/>
Parameters:<br/>
 None.<br/>
Returns:<br/>
 True if this ISO has Rock Ridge extensions, False otherwise.</tt></dd></dl>
<dl><dt><a name="PyCdlib-has_udf"><strong>has_udf</strong></a>(self)</dt><dd><tt>Returns whether this ISO has UDF extensions.<br/>
 <br/>
Parameters:<br/>
 None.<br/>
Returns:<br/>
 True if this ISO has UDF, False otherwise.</tt></dd></dl>
<dl><dt><a name="PyCdlib-list_children"><strong>list_children</strong></a>(self, **kwargs)</dt><dd><tt>Generate a list of all of the file/directory objects in the<br/>
specified location on the ISO.<br/>
 <br/>
Parameters:<br/>
 iso_path - The absolute path on the ISO to list the children for.<br/>
 rr_path - The absolute Rock Ridge path on the ISO to list the children for.<br/>
 joliet_path - The absolute Joliet path on the ISO to list the children for.<br/>
 udf_path - The absolute UDF path on the ISO to list the children for.<br/>
Yields:<br/>
 Children of this path.<br/>
Returns:<br/>
 Nothing.</tt></dd></dl>
<dl><dt><a name="PyCdlib-list_dir"><strong>list_dir</strong></a>(self, iso_path, joliet=False)</dt><dd><tt>(deprecated) Generate a list of all of the file/directory objects in the<br/>
specified location on the ISO.  It is recommended to use the<br/>
'list_children' API instead.<br/>
 <br/>
Parameters:<br/>
 iso_path - The path on the ISO to look up information for.<br/>
 joliet - Whether to look for the path in the Joliet portion of the ISO.<br/>
Yields:<br/>
 Children of this path.<br/>
Returns:<br/>
 Nothing.</tt></dd></dl>
<dl><dt><a name="PyCdlib-modify_file_in_place"><strong>modify_file_in_place</strong></a>(self, fp, length, iso_path, rr_name=None, joliet_path=None, udf_path=None)</dt><dd><tt>An API to modify a file in place on the ISO.  This can be extremely fast<br/>
(much faster than calling the write method), but has many restrictions.<br/>
 <br/>
1.  The original ISO file pointer must have been opened for reading<br/>
    and writing.<br/>
2.  Only an existing *file* can be modified; directories cannot be<br/>
    changed.<br/>
3.  Only an existing file can be *modified*; no new files can be added<br/>
    or removed.<br/>
4.  The new file contents must use the same number of extents (typically<br/>
    2048 bytes) as the old file contents.  If using this API to shrink<br/>
    a file, this is usually easy since the new contents can be padded<br/>
    out with zeros or newlines to meet the requirement.  If using this<br/>
    API to grow a file, the new contents can only grow up to the next<br/>
    extent boundary.<br/>
 <br/>
Unlike all other APIs in <a href="#PyCdlib">PyCdlib</a>, this API actually modifies the<br/>
originally opened on-disk file, so use it with caution.<br/>
 <br/>
Parameters:<br/>
 fp - The file <a href="builtins.html#object">object</a> to use for the contents of the new file.<br/>
 length - The length of the new data for the file.<br/>
 iso_path - The ISO9660 absolute path to the file destination on the ISO.<br/>
 rr_name - The Rock Ridge name of the file destination on the ISO.<br/>
 joliet_path - The Joliet absolute path to the file destination on the ISO.<br/>
 udf_path - The UDF absolute path to the file destination on the ISO.<br/>
Returns:<br/>
 Nothing.</tt></dd></dl>
<dl><dt><a name="PyCdlib-new"><strong>new</strong></a>(self, interchange_level=1, sys_ident='', vol_ident='', set_size=1, seqnum=1, log_block_size=2048, vol_set_ident=' ', pub_ident_str='', preparer_ident_str='', app_ident_str='', copyright_file='', abstract_file='', bibli_file='', vol_expire_date=None, app_use='', joliet=None, rock_ridge=None, xa=False, udf=None)</dt><dd><tt>Create a new ISO from scratch.<br/>
 <br/>
Parameters:<br/>
 interchange_level - The ISO9660 interchange level to use; this dictates<br/>
                     the rules on the names of files.  Levels 1, 2, 3,<br/>
                     and 4 are supported.  Level 1 is the most<br/>
                     conservative, and is the default, but level 3 is<br/>
                     recommended.<br/>
 sys_ident - The system identification string to use on the new ISO.<br/>
 vol_ident - The volume identification string to use on the new ISO.<br/>
 set_size - The size of the set of ISOs this ISO is a part of.<br/>
 seqnum - The sequence number of the set of this ISO.<br/>
 log_block_size - The logical block size to use for the ISO.  While ISO9660<br/>
                  technically supports sizes other than 2048 (the default),<br/>
                  this almost certainly doesn't work.<br/>
 vol_set_ident - The volume set identification string to use on the new ISO.<br/>
 pub_ident_str - The publisher identification string to use on the new ISO.<br/>
 preparer_ident_str - The preparer identification string to use on the new ISO.<br/>
 app_ident_str - The application identification string to use on the new ISO.<br/>
 copyright_file - The name of a file at the root of the ISO to use as the<br/>
                  copyright file.<br/>
 abstract_file - The name of a file at the root of the ISO to use as the<br/>
                 abstract file.<br/>
 bibli_file - The name of a file at the root of the ISO to use as the<br/>
              bibliographic file.<br/>
 vol_expire_date - The date that this ISO will expire at.<br/>
 app_use - Arbitrary data that the application can stuff into the primary<br/>
           volume descriptor of this ISO.<br/>
 joliet - A integer that can have the value 1, 2, or 3 for Joliet<br/>
          levels 1, 2, or 3 (3 is by far the most common), or None for<br/>
          no Joliet support (the default).  For legacy reasons, this<br/>
          parameter also accepts a boolean, where the value of 'False'<br/>
          means no Joliet and a value of 'True' means level 3.<br/>
 rock_ridge - Whether to make this ISO have the Rock Ridge extensions or<br/>
              not.  The default value of None does not add Rock Ridge<br/>
              extensions.  A string value of '1.09', '1.10', or '1.12'<br/>
              adds the specified Rock Ridge version to the ISO.  If<br/>
              unsure, pass '1.09' to ensure maximum compatibility.<br/>
 xa - Whether to add the ISO9660 Extended Attribute extensions to this<br/>
      ISO.  The default is False.<br/>
 udf - Whether to add UDF support to this ISO.  If it is None (the<br/>
       default), no UDF support is added.  If it is "2.60", version 2.60<br/>
       of the UDF spec is used.  All other values are disallowed.<br/>
Returns:<br/>
 Nothing.</tt></dd></dl>
<dl><dt><a name="PyCdlib-open"><strong>open</strong></a>(self, filename, mode='rb')</dt><dd><tt>Open up an existing ISO for inspection and modification.<br/>
 <br/>
Parameters:<br/>
 filename - The filename containing the ISO to open up.<br/>
Returns:<br/>
 Nothing.</tt></dd></dl>
<dl><dt><a name="PyCdlib-open_file_from_iso"><strong>open_file_from_iso</strong></a>(self, **kwargs)</dt><dd><tt>Open a file for reading in a context manager.  This allows the user to<br/>
operate on the file in user-defined chunks (utilizing the read() method<br/>
of the returned context manager).<br/>
 <br/>
Parameters:<br/>
 iso_path - The absolute ISO path to the file on the ISO.<br/>
 rr_path - The absolute Rock Ridge path to the file on the ISO.<br/>
 joliet_path - The absolute Joliet path to the file on the ISO.<br/>
 udf_path - The absolute UDF path to the file on the ISO.<br/>
Returns:<br/>
 A PyCdlibIO <a href="builtins.html#object">object</a> allowing access to the file.</tt></dd></dl>
<dl><dt><a name="PyCdlib-open_fp"><strong>open_fp</strong></a>(self, fp)</dt><dd><tt>Open up an existing ISO for inspection and modification.  Note that the<br/>
file <a href="builtins.html#object">object</a> passed in here must stay open for the lifetime of this<br/>
<a href="builtins.html#object">object</a>, as the <a href="#PyCdlib">PyCdlib</a> class uses it internally to do writing and reading<br/>
operations.  To have <a href="#PyCdlib">PyCdlib</a> manage this automatically, use 'open'<br/>
instead.<br/>
 <br/>
Parameters:<br/>
 fp - The file <a href="builtins.html#object">object</a> containing the ISO to open up.<br/>
Returns:<br/>
 Nothing.</tt></dd></dl>
<dl><dt><a name="PyCdlib-rm_directory"><strong>rm_directory</strong></a>(self, iso_path=None, rr_name=None, joliet_path=None, udf_path=None)</dt><dd><tt>Remove a directory from the ISO.  The directory must be empty.<br/>
 <br/>
Parameters:<br/>
 iso_path - The path to the directory to remove.<br/>
 rr_name - The Rock Ridge name of the directory to remove.<br/>
 joliet_path - The Joliet path to the directory to remove.<br/>
 udf_path - The UDF absolute path to the directory to remove.<br/>
Returns:<br/>
 Nothing.</tt></dd></dl>
<dl><dt><a name="PyCdlib-rm_eltorito"><strong>rm_eltorito</strong></a>(self)</dt><dd><tt>Remove the El Torito boot record (and Boot Catalog) from the ISO.<br/>
 <br/>
Parameters:<br/>
 None.<br/>
Returns:<br/>
 Nothing.</tt></dd></dl>
<dl><dt><a name="PyCdlib-rm_file"><strong>rm_file</strong></a>(self, iso_path=None, rr_name=None, joliet_path=None, udf_path=None)</dt><dd><tt>Remove a file from the ISO.  This removes the data and the listing of<br/>
the file from all contexts, even when only one path is given (to only<br/>
remove it from a single context, use <a href="#PyCdlib-rm_hard_link">rm_hard_link</a>() instead).  Due to<br/>
some complexities of the ISO format, removal of zero-byte files from all<br/>
contexts does not automatically happen, so this method may need to be<br/>
called more than once for zero-byte files.<br/>
 <br/>
Parameters:<br/>
 iso_path - The path to the file to remove.<br/>
 rr_name - The Rock Ridge name of the file to remove.<br/>
 joliet_path - The Joliet path to the file to remove.<br/>
 udf_path - The UDF path to the file to remove.<br/>
Returns:<br/>
 Nothing.</tt></dd></dl>
<dl><dt><a name="PyCdlib-rm_hard_link"><strong>rm_hard_link</strong></a>(self, iso_path=None, joliet_path=None, udf_path=None)</dt><dd><tt>Remove a hard link from the ISO.  If the number of links to a piece of<br/>
data drops to zero, then the contents will be removed from the ISO.<br/>
This can be thought of as a lower-level interface to <a href="#PyCdlib-rm_file">rm_file</a>().  Either<br/>
an ISO9660 path or a Joliet path must be passed to this API, but not<br/>
both.  Thus, this interface can be used to hide files from either the<br/>
ISO9660 filesystem, the Joliet filesystem, or both (if there is another<br/>
reference to the data on the ISO, such as in El Torito).  Note that this<br/>
is an advanced API, so using it in combination with the higher-level APIs<br/>
(like <a href="#PyCdlib-rm_file">rm_file</a>()) may result in unexpected behavior.  Once this API has<br/>
been used, this API and <a href="#PyCdlib-add_hard_link">add_hard_link</a>() should be preferred over<br/>
<a href="#PyCdlib-rm_file">rm_file</a>() and <a href="#PyCdlib-add_file">add_file</a>().<br/>
 <br/>
Parameters:<br/>
 iso_path - The ISO link path to remove.<br/>
 joliet_path - The Joliet link path to remove.<br/>
 udf_path - The UDF link path to remove.<br/>
Returns:<br/>
 Nothing.</tt></dd></dl>
<dl><dt><a name="PyCdlib-rm_isohybrid"><strong>rm_isohybrid</strong></a>(self)</dt><dd><tt>Remove the 'hybridization' of an ISO, making it a traditional ISO again.<br/>
This means the ISO will no longer be able to be copied and booted off<br/>
of traditional media (like USB sticks).<br/>
 <br/>
Parameters:<br/>
 None.<br/>
Returns:<br/>
 Nothing.</tt></dd></dl>
<dl><dt><a name="PyCdlib-rm_joliet_directory"><strong>rm_joliet_directory</strong></a>(self, joliet_path)</dt><dd><tt>(deprecated) Remove a Joliet directory from the ISO.  It is recommended<br/>
to use the 'joliet_path' parameter to 'rm_directory' instead.<br/>
 <br/>
Parameters:<br/>
 joliet_path - The Joliet path to the directory to remove.<br/>
Returns:<br/>
 Nothing.</tt></dd></dl>
<dl><dt><a name="PyCdlib-set_hidden"><strong>set_hidden</strong></a>(self, iso_path=None, rr_path=None, joliet_path=None)</dt><dd><tt>Set the ISO9660 hidden attribute on a file or directory.  This will<br/>
cause the file or directory not to show up when listing entries on the<br/>
ISO.  Exactly one of iso_path, rr_path, or joliet_path must be specified.<br/>
 <br/>
Parameters:<br/>
 iso_path - The path on the ISO to set the hidden bit on.<br/>
 rr_path - The Rock Ridge path on the ISO to set the hidden bit on.<br/>
 joliet_path - The Joliet path on the ISO to set the hidden bit on.<br/>
Returns:<br/>
 Nothing.</tt></dd></dl>
<dl><dt><a name="PyCdlib-set_relocated_name"><strong>set_relocated_name</strong></a>(self, name, rr_name)</dt><dd><tt>Set the name of the relocated directory on a Rock Ridge ISO.  The ISO<br/>
must be a Rock Ridge one, and must not have previously had the relocated<br/>
name set.<br/>
 <br/>
Parameters:<br/>
 name - The name for a relocated directory.<br/>
 rr_name - The Rock Ridge name for a relocated directory.<br/>
Returns:<br/>
 Nothing.</tt></dd></dl>
<dl><dt><a name="PyCdlib-walk"><strong>walk</strong></a>(self, **kwargs)</dt><dd><tt>Walk the entries on the ISO, starting at the given path.  One, and only<br/>
one, of iso_path, rr_path, joliet_path, and udf_path is allowed.<br/>
Similar to os.<a href="#PyCdlib-walk">walk</a>(), yield a 3-tuple of (path-to-here, dirlist, filelist)<br/>
for each directory level.<br/>
 <br/>
Parameters:<br/>
 iso_path - The absolute ISO path to the starting entry on the ISO.<br/>
 rr_path - The absolute Rock Ridge path to the starting entry on the ISO.<br/>
 joliet_path - The absolute Joliet path to the starting entry on the ISO.<br/>
 udf_path - The absolute UDF path to the starting entry on the ISO.<br/>
Yields:<br/>
 3-tuples of (path-to-here, dirlist, filelist)<br/>
Returns:<br/>
 Nothing.</tt></dd></dl>
<dl><dt><a name="PyCdlib-write"><strong>write</strong></a>(self, filename, blocksize=32768, progress_cb=None, progress_opaque=None)</dt><dd><tt>Write a properly formatted ISO out to the filename passed in.  This<br/>
also goes by the name of 'mastering'.<br/>
 <br/>
Parameters:<br/>
 filename - The filename to write the data to.<br/>
 blocksize - The blocksize to use when copying data; set to 32768 by default.<br/>
 progress_cb - If not None, a function to call as the write call does its<br/>
               work.  The callback function must have a signature of:<br/>
               def func(done, total, opaque).<br/>
 progress_opaque - User data to be passed to the progress callback.<br/>
Returns:<br/>
 Nothing.</tt></dd></dl>
<dl><dt><a name="PyCdlib-write_fp"><strong>write_fp</strong></a>(self, outfp, blocksize=32768, progress_cb=None, progress_opaque=None)</dt><dd><tt>Write a properly formatted ISO out to the file <a href="builtins.html#object">object</a> passed in.  This<br/>
also goes by the name of 'mastering'.<br/>
 <br/>
Parameters:<br/>
 outfp - The file <a href="builtins.html#object">object</a> to write the data to.<br/>
 blocksize - The blocksize to use when copying data; set to 32768 by default.<br/>
 progress_cb - If not None, a function to call as the write call does its<br/>
               work.  The callback function must have a signature of:<br/>
               def func(done, total, opaque).<br/>
 progress_opaque - User data to be passed to the progress callback.<br/>
Returns:<br/>
 Nothing.</tt></dd></dl>
<hr/>
Data descriptors defined here:<br/>
<dl><dt><strong>brs</strong></dt>
</dl>
<dl><dt><strong>eltorito_boot_catalog</strong></dt>
</dl>
<dl><dt><strong>enhanced_vd</strong></dt>
</dl>
<dl><dt><strong>inodes</strong></dt>
</dl>
<dl><dt><strong>interchange_level</strong></dt>
</dl>
<dl><dt><strong>isohybrid_mbr</strong></dt>
</dl>
<dl><dt><strong>joliet_vd</strong></dt>
</dl>
<dl><dt><strong>logical_block_size</strong></dt>
</dl>
<dl><dt><strong>pvd</strong></dt>
</dl>
<dl><dt><strong>pvds</strong></dt>
</dl>
<dl><dt><strong>rock_ridge</strong></dt>
</dl>
<dl><dt><strong>svds</strong></dt>
</dl>
<dl><dt><strong>udf_anchors</strong></dt>
</dl>
<dl><dt><strong>udf_beas</strong></dt>
</dl>
<dl><dt><strong>udf_boots</strong></dt>
</dl>
<dl><dt><strong>udf_file_set</strong></dt>
</dl>
<dl><dt><strong>udf_file_set_terminator</strong></dt>
</dl>
<dl><dt><strong>udf_logical_volume_integrity</strong></dt>
</dl>
<dl><dt><strong>udf_logical_volume_integrity_terminator</strong></dt>
</dl>
<dl><dt><strong>udf_main_descs</strong></dt>
</dl>
<dl><dt><strong>udf_nsr</strong></dt>
</dl>
<dl><dt><strong>udf_reserve_descs</strong></dt>
</dl>
<dl><dt><strong>udf_root</strong></dt>
</dl>
<dl><dt><strong>udf_teas</strong></dt>
</dl>
<dl><dt><strong>vdsts</strong></dt>
</dl>
<dl><dt><strong>version_vd</strong></dt>
</dl>
<dl><dt><strong>xa</strong></dt>
</dl>
</td></tr></table></td></tr></table><p>
</p><table width="100%" cellspacing="0" cellpadding="2" border="0" summary="section">
<tr bgcolor="#55aa55">
<td colspan="3" valign="bottom"> <br/>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
<tr><td bgcolor="#55aa55"><tt>      </tt></td><td> </td>
<td width="100%"><strong>absolute_import</strong> = _Feature((2, 5, 0, 'alpha', 1), (3, 0, 0, 'alpha', 0), 262144)</td></tr></table>
</body></html>
|