diff options
author | dos-reis <gdr@axiomatics.org> | 2007-08-14 05:14:52 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2007-08-14 05:14:52 +0000 |
commit | ab8cc85adde879fb963c94d15675783f2cf4b183 (patch) | |
tree | c202482327f474583b750b2c45dedfc4e4312b1d /src/algebra/fname.spad.pamphlet | |
download | open-axiom-ab8cc85adde879fb963c94d15675783f2cf4b183.tar.gz |
Initial population.
Diffstat (limited to 'src/algebra/fname.spad.pamphlet')
-rw-r--r-- | src/algebra/fname.spad.pamphlet | 148 |
1 files changed, 148 insertions, 0 deletions
diff --git a/src/algebra/fname.spad.pamphlet b/src/algebra/fname.spad.pamphlet new file mode 100644 index 00000000..1a66d427 --- /dev/null +++ b/src/algebra/fname.spad.pamphlet @@ -0,0 +1,148 @@ +\documentclass{article} +\usepackage{axiom} +\begin{document} +\title{\$SPAD/src/algebra fname.spad} +\author{Stephen M. Watt} +\maketitle +\begin{abstract} +\end{abstract} +\eject +\tableofcontents +\eject +\section{category FNCAT FileNameCategory} +<<category FNCAT FileNameCategory>>= +)abbrev category FNCAT FileNameCategory +++ Author: Stephen M. Watt +++ Date Created: 1985 +++ Date Last Updated: June 20, 1991 +++ Basic Operations: +++ Related Domains: +++ Also See: +++ AMS Classifications: +++ Keywords: +++ Examples: +++ References: +++ Description: +++ This category provides an interface to names in the file system. + +FileNameCategory(): Category == SetCategory with + + coerce: String -> % + ++ coerce(s) converts a string to a file name + ++ according to operating system-dependent conventions. + coerce: % -> String + ++ coerce(fn) produces a string for a file name + ++ according to operating system-dependent conventions. + + filename: (String, String, String) -> % + ++ filename(d,n,e) creates a file name with + ++ d as its directory, n as its name and e as its extension. + ++ This is a portable way to create file names. + ++ When d or t is the empty string, a default is used. + + directory: % -> String + ++ directory(f) returns the directory part of the file name. + name: % -> String + ++ name(f) returns the name part of the file name. + extension: % -> String + ++ extension(f) returns the type part of the file name. + + exists?: % -> Boolean + ++ exists?(f) tests if the file exists in the file system. + readable?: % -> Boolean + ++ readable?(f) tests if the named file exist and can it be opened + ++ for reading. + writable?: % -> Boolean + ++ writable?(f) tests if the named file be opened for writing. + ++ The named file need not already exist. + + new: (String, String, String) -> % + ++ new(d,pref,e) constructs the name of a new writable file with + ++ d as its directory, pref as a prefix of its name and + ++ e as its extension. + ++ When d or t is the empty string, a default is used. + ++ An error occurs if a new file cannot be written in the given + ++ directory. + +@ +\section{domain FNAME FileName} +<<domain FNAME FileName>>= +)abbrev domain FNAME FileName +++ Author: Stephen M. Watt +++ Date Created: 1985 +++ Date Last Updated: June 20, 1991 +++ Basic Operations: +++ Related Domains: +++ Also See: +++ AMS Classifications: +++ Keywords: +++ Examples: +++ References: +++ Description: +++ This domain provides an interface to names in the file system. + +FileName(): FileNameCategory == add + + f1 = f2 == EQUAL(f1, f2)$Lisp + coerce(f: %): OutputForm == f::String::OutputForm + + coerce(f: %): String == NAMESTRING(f)$Lisp + coerce(s: String): % == PARSE_-NAMESTRING(s)$Lisp + + filename(d,n,e) == fnameMake(d,n,e)$Lisp + + directory(f:%): String == fnameDirectory(f)$Lisp + name(f:%): String == fnameName(f)$Lisp + extension(f:%): String == fnameType(f)$Lisp + + exists? f == fnameExists?(f)$Lisp + readable? f == fnameReadable?(f)$Lisp + writable? f == fnameWritable?(f)$Lisp + + new(d,pref,e) == fnameNew(d,pref,e)$Lisp + +@ +\section{License} +<<license>>= +--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. +--All rights reserved. +-- +--Redistribution and use in source and binary forms, with or without +--modification, are permitted provided that the following conditions are +--met: +-- +-- - Redistributions of source code must retain the above copyright +-- notice, this list of conditions and the following disclaimer. +-- +-- - Redistributions in binary form must reproduce the above copyright +-- notice, this list of conditions and the following disclaimer in +-- the documentation and/or other materials provided with the +-- distribution. +-- +-- - Neither the name of The Numerical ALgorithms Group Ltd. nor the +-- names of its contributors may be used to endorse or promote products +-- derived from this software without specific prior written permission. +-- +--THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +--IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +--TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +--PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +--OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +--EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +--PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +--PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +--LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +--NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +--SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +@ +<<*>>= +<<license>> + +<<category FNCAT FileNameCategory>> +<<domain FNAME FileName>> +@ +\eject +\begin{thebibliography}{99} +\bibitem{1} nothing +\end{thebibliography} +\end{document} |