aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2008-09-14 05:22:19 +0000
committerdos-reis <gdr@axiomatics.org>2008-09-14 05:22:19 +0000
commitcb2898bace89b16b4deae484375513c12a2d3b47 (patch)
tree111525a5f43333ddb4ccc1072e11f40d28ed0149 /src/interp
parenta09fa1e3605d190ccc02f2254abacb1eb4df150e (diff)
downloadopen-axiom-cb2898bace89b16b4deae484375513c12a2d3b47.tar.gz
* interp/sys-os.boot (readablep): Import.
(writeablep): Document. * algebra/fname.spad.pamphlet (exists?$FileName): Use existingFile? (readable?$FileName): Use readablep. (writeable?$FileName): Use writeable.
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/sys-os.boot22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/interp/sys-os.boot b/src/interp/sys-os.boot
index 3d3ecc6d..3ab992a8 100644
--- a/src/interp/sys-os.boot
+++ b/src/interp/sys-os.boot
@@ -45,6 +45,8 @@ module sys_-os
loadSystemRuntimeCore()
+--% File System Support
+
++ change current working directory.
import oa__chdir: string -> int for changeDirectory
-- 0: success, -1: failure
@@ -61,6 +63,22 @@ import oa__rename: (string,string) -> int for renameFile
import oa__mkdir: string -> int for mkdir
-- 0: sucess, -1: failure.
+++ Test whether a path names a directory.
+import directoryp: string -> int for directoryp
+
+++ Test whether a file exists and is accessible for read.
+import readablep: string -> int for readablep
+ -- -1: inexistent.
+ -- 0: exist but read access denied.
+ -- 1: exist and read accress granted.
+
+++ Test whether a file exists and is accessible for write.
+import writeablep: string -> int for writeablep
+ -- -1: inexistent.
+ -- 0: exists but write access denied
+ -- 1: exists and write access granted
+ -- 2: inexistent but write access to parent directory granted.
+
import oa__filedesc__read: (int,buffer,int) -> int for readFromFileHandle
-- -1: failure; otherwise
-- actual read bytes count
@@ -124,10 +142,6 @@ import sock__send__signal: (int,int) -> int for sockSendSignal
import print__line: string -> int for printLine
--%
-import directoryp: string -> int for directoryp
-
-
-import writeablep: string -> int for writeablep
import oa__system: string -> int for runCommand