Sync
This commit is contained in:
parent
6f050a029e
commit
776bba907c
3887 changed files with 59894 additions and 7280 deletions
|
|
@ -0,0 +1,31 @@
|
|||
/* NetRexx */
|
||||
options replace format comments java crossref symbols binary
|
||||
|
||||
runSample(arg)
|
||||
return
|
||||
|
||||
-- . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
|
||||
method makeTempFile(prefix = String, suffix = String null, startDir = String null) -
|
||||
public static signals IOException returns File
|
||||
if startDir \= null then fStartDir = File(startDir)
|
||||
else fStartDir = null
|
||||
ff = File.createTempFile(prefix, suffix, fStartDir)
|
||||
ff.deleteOnExit() -- make sure the file is deleted at termination
|
||||
return ff
|
||||
|
||||
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
method runSample(arg) private static
|
||||
do
|
||||
tempFiles = [ -
|
||||
makeTempFile('rexx'), -
|
||||
makeTempFile('rexx', '.rex'), -
|
||||
makeTempFile('rexx', null, './tmp') -
|
||||
]
|
||||
loop fFile over tempFiles
|
||||
fName = fFile.getCanonicalPath()
|
||||
say 'Temporary file:' fName
|
||||
end fFile
|
||||
catch ex = IOException
|
||||
ex.printStackTrace()
|
||||
end
|
||||
return
|
||||
Loading…
Add table
Add a link
Reference in a new issue