File:
[Coherent Logic Development] /
freem /
contrib /
%FUTIL.m
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs
Sun Jan 19 02:04:04 2025 UTC (2 months, 2 weeks ago) by
snw
Branches:
MAIN,
CoherentLogicDevelopment
CVS tags:
v0-63-1-rc1,
v0-63-0-rc1,
v0-63-0,
v0-62-3,
v0-62-2,
v0-62-1,
v0-62-0,
start,
HEAD
FreeM
%FUTIL ; A.Trocha ; File i/o Library[1999/02/01-20:20:05]
; $Source: /home/cvsroot/freem/contrib/%FUTIL.m,v $
; $Revision: 1.1.1.1 $ $Date: 2025/01/19 02:04:04 $
Q
;
;
direx(path) ;--- test if directory exists
; 0 = does not exist 1 = success
;
S $ZT="direx99^"_$ZN
N tmp
S tmp=$V(2)
V 2:path
V 2:tmp
Q 1
Q
direx99 ;--- error
Q 0
;
;
mkdir(path) ;--- create directory
; 0 = error 1 = ok
;
N exec
S exec="!mkdir "_path_">/dev/null"
X exec
Q $$direx(path)
;
;
rmdir(path) ;--- delete directory "rm -r"
; **** take care ****
N exec
S exec="!rm -r "_path_">/dev/null"
X exec
Q '$$direx(path)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>