Create a file: Difference between revisions

no edit summary
No edit summary
Line 1,347:
.........
</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}}==
408

edits