Create a file: Difference between revisions

Content added Content deleted
No edit summary
Line 1,347: Line 1,347:
.........
.........
</pre>
</pre>

=={{header|FutureBasic}}==
<syntaxhighlight lang="futurebasic">
include "NSLog.incl"

CFURLRef url

url = fn URLFileURLWithPath( fn StringByExpandingTildeInPath(@"~/Desktop/output.txt") )
if (fn FileManagerCreateFileAtURL( url, NULL, NULL ) )
NSLog( @"File \"output.txt\" created." )
else
NSLog( @"Unable to create file \"output.txt\"." )
end if

url = fn URLFileURLWithPath( fn StringByExpandingTildeInPath(@"~/Desktop/docs") )
if (fn FileManagerCreateDirectoryAtURL( url, YES, NULL ) )
NSLog( @"Directory \"docs\" created." )
else
NSLog( @"Unabled to create directory \"docs\"." )
end if

HandleEvents
</syntaxhighlight>


=={{header|Go}}==
=={{header|Go}}==