RosettaCodeData/Task/Create-a-file/Phix/create-a-file.phix

16 lines
277 B
Plaintext

integer fn
-- In the current working directory
system("mkdir docs",2)
fn = open("output.txt","w")
close(fn)
-- In the filesystem root
system("mkdir \\docs",2)
fn = open("\\output.txt","w")
if fn=-1 then
puts(1,"unable to create \\output.txt\n")
else
close(fn)
end if