373 |
(concat (if (= type 1) " ==> " " --> ") link-name) |
(concat (if (= type 1) " ==> " " --> ") link-name) |
374 |
"")))) |
"")))) |
375 |
|
|
376 |
|
(defun tar-untar-buffer () |
377 |
|
"Extract all archive members in the tar-file." |
378 |
|
(interactive) |
379 |
|
(let ((multibyte enable-multibyte-characters)) |
380 |
|
(unwind-protect |
381 |
|
(save-restriction |
382 |
|
(widen) |
383 |
|
(set-buffer-multibyte nil) |
384 |
|
(dolist (descriptor tar-parse-info) |
385 |
|
(let* ((tokens (tar-desc-tokens descriptor)) |
386 |
|
(name (tar-header-name tokens)) |
387 |
|
(dir (file-name-directory name)) |
388 |
|
(start (+ (tar-desc-data-start descriptor) tar-header-offset -1)) |
389 |
|
(end (+ start (tar-header-size tokens)))) |
390 |
|
(message "Extracting %s" name) |
391 |
|
(if (and dir (not (file-exists-p dir))) |
392 |
|
(make-directory dir t)) |
393 |
|
(write-region start end name) |
394 |
|
(set-file-modes name (tar-header-mode tokens))))) |
395 |
|
(set-buffer-multibyte multibyte)))) |
396 |
|
|
397 |
(defun tar-summarize-buffer () |
(defun tar-summarize-buffer () |
398 |
"Parse the contents of the tar file in the current buffer. |
"Parse the contents of the tar file in the current buffer. |
399 |
Place a dired-like listing on the front; |
Place a dired-like listing on the front; |