Subversion Repositories wimsdev

Rev

Rev 17533 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
20 reyssat 1
# This script has the right to write to a file in the user's getfile
2
# directory.
3
# Format of input: multi-line.
4
# Line 1: two words. Word 1: file name. Word 2: "append" or "new".
5
# 	Word 2 defaults to "append".
6
# Line 2 and up: content to write.
18423 bpr 7
!if obot isin $session
8
  !exit
9
!endif
20 reyssat 10
tgf_1=!line 1 of $wims_read_parm
11
tgf_c=!line 2 to -1 of $wims_read_parm
12
!distribute words $tgf_1 into tgf_w1, tgf_w2
13
tgf_w1=!replace internal getfile/ by $ in $tgf_w1
14
!if $tgf_w1=$empty or / isin $tgf_w1 or .. isin $tgf_w1
12325 bpr 15
  !exit
20 reyssat 16
!endif
17
!if $tgf_w2=new
12325 bpr 18
  !filewrite getfile/$tgf_w1 $tgf_c
20 reyssat 19
!else
12325 bpr 20
  !fileappend getfile/$tgf_w1 $tgf_c
20 reyssat 21
!endif