Check that file exists: Difference between revisions

No edit summary
Line 1,434:
 
CFURLRef url
url = fn URLFileURLWithPath( fn StringByExpandingTildeInPath(@"~/Desktop/myTextFileinput.txt") )
if (fn FileManagerFileExistsAtURL( url ) )
NSLog( @"File already\"input.txt\" exists." )
else
NSLog( @"File \"input.txt\" does not exist at this location." )
end if
 
url = fn URLFileURLWithPath( fn StringByExpandingTildeInPath(@"~/Desktop/docs") )
if (fn FileManagerIsDirectoryAtURL( url ) )
NSLog( @"Directory \"docs\" exists." )
else
NSLog( @"Directory \"docs\" does not exist at this location." )
end if
 
HandleEvents
</syntaxhighlight>
 
 
=={{header|Gambas}}==
408

edits