1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
%D \module
%D [ file=x-dir-05,
%D version=2003.05.10, % around that time -)
%D title=\CONTEXT\ Directory Handling,
%D subtitle=Access,
%D author=Hans Hagen,
%D date=\currentdate,
%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\setvariables
[filestate]
[name=,base=,type=,size=,permissions=,date=]
\def\savefilestate
{\dodoubleargument\dosavefilestate}
\def\dosavefilestate[#1][#2]%
{\startnointerference
\setxvariables
[#1]
[name=#2,base=,type=,size=,permissions=,date=]
\executesystemcommand{texmfstart xmltools.rb --dir --pattern=\getvariable{#1}{name} --output=xmldir.tmp}
\defineXMLprocess [files]
\defineXMLprocess [directory]
\defineXMLenvironment [file]
{\defineXMLsave [base]
\defineXMLsave [type]
\defineXMLsave [size]
\defineXMLsave [permissions]
\defineXMLsave [date]}
{\setxvariables
[#1]
[name=\XMLop{name},
base=\XMLflush{base},
type=\XMLflush{type},
size=\XMLflush{size},
permissions=\XMLflush{permissions},
date=\XMLflush{date}]}
\startXMLignore
\processXMLfile{xmldir.tmp}
\stopXMLignore
\stopnointerference}
\def\getfilestate#1% old one
{\savefilestate[filestate][#1]}
\endinput
|