Advertisement
rotrevrep

Extract sample

Mar 9th, 2015
1,331
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using Archive;
  2.  
  3. public static void main (string[] args) {
  4.     var read = new Read();
  5.     read.support_filter_all();
  6.     read.support_format_all();
  7.     var file = FileStream.open ("/path/to/archive.xz", "r");
  8.     var res = read.open_FILE (file);
  9.     if (res == Result.OK) {
  10.         unowned Entry entry;
  11.         while (read.next_header (out entry) == Result.OK)
  12.             read.extract (entry);
  13.     } else print ("error\n");
  14. }
Advertisement
RAW Paste Data Copied
Advertisement