;;; -*-Scheme-*-
;;;
-;;; $Id: imail-core.scm,v 1.136 2001/05/24 17:51:14 cph Exp $
+;;; $Id: imail-core.scm,v 1.137 2001/05/25 02:45:29 cph Exp $
;;;
;;; Copyright (c) 1999-2001 Massachusetts Institute of Technology
;;;
;; server is Cyrus, this will return "imap://localhost/inbox/".
(define-generic container-url-for-prompt (url))
-;; Return the child name of a URL. The child name of a URL is the
+;; Return the content name of a URL. The content name of a URL is the
;; suffix of the URL that uniquely identifies the resource with
;; respect to its container.
;;
;; Here are some examples:
;;
-;; URL child name
-;; --------------------------- ----------
+;; URL content name
+;; --------------------------- ------------
;; imap://localhost/inbox/foo foo
;; imap://localhost/inbox/foo/ foo/
;; file:/usr/home/cph/foo.mail foo.mail
-(define-generic url-child-name (url))
+(define-generic url-content-name (url))
-;; Return a URL that refers to the child CHILD-NAME of the container
+;; Return a URL that refers to the content NAME of the container
;; referred to by CONTAINER-URL.
-(define-generic make-child-url (container-url child-name))
+(define-generic make-content-url (container-url name))
-;; Return the base name of FOLDER-URL. This is the child name of
+;; Return the base name of FOLDER-URL. This is the content name of
;; FOLDER-URL, but presented in a type-independent way. For example,
-;; if the child name of a file URL is "foo.mail", the base name is
+;; if the content name of a file URL is "foo.mail", the base name is
;; just "foo".
(define-generic url-base-name (folder-url))
(make-string-hash-table))
(define (url-presentation-name url)
- (let ((child-name (url-child-name url)))
- (if (string-suffix? "/" child-name)
- (string-head child-name (fix:- (string-length child-name) 1))
- child-name)))
+ (let ((name (url-content-name url)))
+ (if (string-suffix? "/" name)
+ (string-head name (fix:- (string-length name) 1))
+ name)))
\f
;; Do completion on URL-STRING, which is a partially-specified URL.
;; Tail-recursively calls one of the three procedure arguments, as
(define-method container-url-for-prompt ((resource <resource>))
(container-url-for-prompt (resource-locator resource)))
-(define-method url-child-name ((resource <resource>))
- (url-child-name (resource-locator resource)))
+(define-method url-content-name ((resource <resource>))
+ (url-content-name (resource-locator resource)))
(define-method url-base-name ((resource <resource>))
(url-base-name (resource-locator resource)))
(define-method %append-message (message (folder <folder>))
(%append-message message (resource-locator folder)))
-(define-method make-child-url ((container <container>) child-name)
- (make-child-url (resource-locator container) child-name))
+(define-method make-content-url ((container <container>) name)
+ (make-content-url (resource-locator container) name))
(define-method container-url-contents ((container <container>))
(container-url-contents (resource-locator container)))
;;; -*-Scheme-*-
;;;
-;;; $Id: imail-file.scm,v 1.72 2001/05/24 17:46:45 cph Exp $
+;;; $Id: imail-file.scm,v 1.73 2001/05/25 02:45:33 cph Exp $
;;;
;;; Copyright (c) 1999-2001 Massachusetts Institute of Technology
;;;
(define-method container-url-for-prompt ((url <pathname-url>))
(make-directory-url (pathname-container (pathname-url-pathname url))))
-(define-method url-child-name ((url <pathname-url>))
+(define-method url-content-name ((url <pathname-url>))
(let ((pathname (pathname-url-pathname url)))
(enough-namestring pathname (pathname-container pathname))))
(define-method url-exists? ((url <directory-url>))
(file-directory? (pathname-url-pathname url)))
-(define-method make-child-url ((url <directory-url>) name)
+(define-method make-content-url ((url <directory-url>) name)
(let ((pathname (merge-pathnames name (pathname-url-pathname url))))
((standard-pathname-url-constructor pathname) pathname)))
;;; -*-Scheme-*-
;;;
-;;; $Id: imail-imap.scm,v 1.162 2001/05/24 19:12:41 cph Exp $
+;;; $Id: imail-imap.scm,v 1.163 2001/05/25 02:45:41 cph Exp $
;;;
;;; Copyright (c) 1999-2001 Massachusetts Institute of Technology
;;;
(get-personal-namespace url)
"")))
-(define-method url-child-name ((url <imap-url>))
+(define-method url-content-name ((url <imap-url>))
(let* ((mailbox (imap-url-mailbox url))
(index (imap-mailbox-container-slash mailbox)))
(if index
(string-tail mailbox (fix:+ index 1))
mailbox)))
-(define-method make-child-url ((url <imap-container-url>) child-name)
- (imap-url-new-mailbox url (string-append (imap-url-mailbox url) child-name)))
+(define-method make-content-url ((url <imap-container-url>) name)
+ (imap-url-new-mailbox url (string-append (imap-url-mailbox url) name)))
(define (imap-url-container-mailbox url)
(let* ((mailbox (imap-url-mailbox url))