;;; -*-Scheme-*-
;;;
-;;; $Id: imail-core.scm,v 1.131 2001/05/24 01:13:39 cph Exp $
+;;; $Id: imail-core.scm,v 1.132 2001/05/24 01:18:45 cph Exp $
;;;
;;; Copyright (c) 1999-2001 Massachusetts Institute of Technology
;;;
;;;; Server operations
;; -------------------------------------------------------------------
-;; Create a new folder named URL. Signal an error if the folder
+;; Create a new resource named URL. Signal an error if the resource
;; already exists or can't be created.
(define (create-resource url)
(define-generic %create-resource (url))
;; -------------------------------------------------------------------
-;; Delete the folder named URL. Signal an error if the folder doesn't
-;; exist or if it can't be deleted.
+;; Delete the resource named URL. Signal an error if the resource
+;; doesn't exist or if it can't be deleted.
(define (delete-resource url)
(%delete-resource url)
(define-generic %delete-resource (url))
;; -------------------------------------------------------------------
-;; Rename the folder named URL to NEW-URL. Signal an error if the
-;; folder doesn't exist, if NEW-URL already refers to a folder, or if
+;; Rename the resource named URL to NEW-URL. Signal an error if the
+;; resource doesn't exist, if NEW-URL already refers to a resource, or if
;; the rename can't be performed for some reason. This operation does
-;; NOT do format conversion, or move a folder from one place to
-;; another. It only allows changing the name of an existing folder.
+;; NOT do format conversion, or move a resource from one place to
+;; another. It only allows changing the name of an existing resource.
(define (rename-resource url new-url)
(%rename-resource url new-url)
(define-generic %rename-resource (url new-url))
;; -------------------------------------------------------------------
-;; Insert a copy of MESSAGE in FOLDER at the end of the existing
-;; messages. Unspecified result.
+;; Insert a copy of MESSAGE in the folder referenced by URL at the end
+;; of the existing messages. Unspecified result.
(define (append-message message url)
(if (%append-message message url)
(define-method resource-type-name ((r <folder>)) r 'FOLDER)
(define-method resource-type-name ((r <container>)) r 'CONTAINER)
+(define-method %append-message (message (folder <folder>))
+ (%append-message message (resource-locator folder)))
+
(define-method make-child-url ((container <container>) name)
(make-child-url (resource-locator container) name))
;;; -*-Scheme-*-
;;;
-;;; $Id: imail-umail.scm,v 1.47 2001/05/23 23:23:48 cph Exp $
+;;; $Id: imail-umail.scm,v 1.48 2001/05/24 01:14:10 cph Exp $
;;;
;;; Copyright (c) 1999-2001 Massachusetts Institute of Technology
;;;
(error:bad-range-argument url 'OPEN-RESOURCE))
(make-umail-folder url))
-(define-method %create-folder ((url <umail-url>))
+(define-method %create-resource ((url <umail-url>))
(if (file-exists? (pathname-url-pathname url))
- (error:bad-range-argument url 'CREATE-FOLDER))
+ (error:bad-range-argument url 'CREATE-RESOURCE))
(let ((folder (make-umail-folder url)))
(set-file-folder-messages! folder '#())
(set-file-folder-file-modification-time! folder (get-universal-time))