comparison lisp/efs/efs-plan9.el @ 22:8fc7fe29b841 r19-15b94

Import from CVS: tag r19-15b94
author cvs
date Mon, 13 Aug 2007 08:50:29 +0200
parents
children 8b8b7f3559a2 8619ce7e4c50
comparison
equal deleted inserted replaced
21:b88636d63495 22:8fc7fe29b841
1 ;; -*-Emacs-Lisp-*-
2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3 ;;
4 ;; File: efs-plan9.el
5 ;; Release: $efs release: 1.15 $
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 warrranty (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.15 $" 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