RosettaCodeData/Task/Create-a-file/Phix/create-a-file.phix
2016-12-05 23:44:36 +01:00

15 lines
277 B
Text

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