Advertisement
rotrevrep

Extract sample

Mar 9th, 2015
3,341
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Vala 0.39 KB | None | 0 0
  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
Add Comment
Please, Sign In to add comment
Advertisement