Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/modules/libjar/zipwriter/test/unit/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 1004 B image not shown  

Quelle  test_bug446708.js

  Sprache: JAVA
 

function run_test() {
  var testBundle = do_get_file("data/test_bug446708");

  RecursivelyZipDirectory(testBundle);
}

// Add |file| to the zip. |path| is the current path for the file.
function AddToZip(zipWriter, path, file) {
  var currentPath = path + file.leafName;

  if (file.isDirectory()) {
    currentPath += "/";
  }

  // THIS IS WHERE THE ERROR OCCURS, FOR THE FILE "st14-1.tiff" IN "test_bug446708"
  zipWriter.addEntryFile(
    currentPath,
    Ci.nsIZipWriter.COMPRESSION_DEFAULT,
    file,
    false
  );

  // if it's a dir, continue adding its contents recursively...
  if (file.isDirectory()) {
    var entries = file.QueryInterface(Ci.nsIFile).directoryEntries;
    while (entries.hasMoreElements()) {
      var entry = entries.nextFile;
      AddToZip(zipWriter, currentPath, entry);
    }
  }

  // ...otherwise, we're done
}

function RecursivelyZipDirectory(bundle) {
  zipW.open(tmpFile, PR_RDWR | PR_CREATE_FILE | PR_TRUNCATE);
  AddToZip(zipW, "", bundle);
  zipW.close();
}

Messung V0.5 in Prozent
C=90 H=82 G=86

¤ Dauer der Verarbeitung: 0.13 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.