Delete a file: Difference between revisions
Content added Content deleted
No edit summary |
No edit summary |
||
Line 750: | Line 750: | ||
</pre> |
</pre> |
||
=={{header|FutureBasic}}== |
|||
<syntaxhighlight lang="futurebasic"> |
|||
include "NSLog.incl" |
|||
CFURLRef url |
|||
url = fn URLFileURLWithPath( fn StringByExpandingTildeInPath( @"~/Desktop/input.txt" ) ) |
|||
if (fn FileManagerRemoveItemAtURL( url ) ) |
|||
NSLog( @"File \"intput.txt\" deleted." ) |
|||
else |
|||
NSLog( @"Unable to delete file \"input.txt\"." ) |
|||
end if |
|||
url = fn URLFileURLWithPath( fn StringByExpandingTildeInPath( @"~/Desktop/docs" ) ) |
|||
if (fn FileManagerRemoveItemAtURL( url ) ) |
|||
NSLog( @"Directory \"docs\" deleted." ) |
|||
else |
|||
NSLog( @"Unabled to delete directory \"docs\"." ) |
|||
end if |
|||
HandleEvents |
|||
</syntaxhighlight> |
|||
=={{header|Gambas}}== |
=={{header|Gambas}}== |