viper -- Update and prettify package-info.in provides.
[packages] / xemacs-packages / efs / efs-plan9.el
1 ;; -*-Emacs-Lisp-*-
2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3 ;;
4 ;; File:         efs-plan9.el
5 ;; Release:      $efs release: 1.24 $
6 ;; Version:      #Revision: 1.1 $
7 ;; RCS:          
8 ;; Description:  efs support for the Plan 9 FTP Server
9 ;; Author:       Sandy Rutherford <sandy@ibm550.sissa.it>
10 ;; Created:      Sat Jan 22 21:26:06 1994 by sandy on ibm550
11 ;; Modified:     Sun Nov 27 18:41:05 1994 by sandy on gandalf
12 ;;
13 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
14
15 ;;; This file is part of efs. See efs.el for copyright
16 ;;; (it's copylefted) and warranty (there isn't one) information.
17
18 ;;; Works for the plan 9 server plan9.att.com. Plan 9 is an
19 ;;; AT&T operating system that is similar to unix.
20
21 (provide 'efs-plan9)
22 (require 'efs)
23
24 (defconst efs-plan9-version
25   (concat (substring "$efs release: 1.24 $" 14 -2)
26           "/"
27           (substring "#Revision: 1.1 $" 11 -2)))
28
29 (efs-defun efs-fix-dir-path plan9 (dir-path)
30   ;; Convert DIR-PATH from UN*X-ish to Plan 9. Does nothing actually.
31   ;; Avoids appending the "." that we do in unix.
32   dir-path)
33
34 (efs-defun efs-allow-child-lookup plan9 (host user dir file)
35   ;; Returns t if FILE in directory DIR could possibly be a subdir
36   ;; according to its file-name syntax, and therefore a child listing should
37   ;; be attempted.
38   ;; Relies on the fact that directories can't have extensions in plan9,
39   ;; I think.
40   (and (not (and (string-equal dir "/") (string-equal file ".")))
41        (progn
42          ;; Makes sure that this is cached, before cd'ing
43          (efs-expand-tilde "~" 'plan9 host user)
44          (efs-raw-send-cd host user
45                           (if (string-equal file ".")
46                               (efs-internal-file-name-nondirectory
47                                dir)
48                             (concat dir file))
49                           t))))
50
51 ;;; end of efs-plan9.el