Check that file exists: Difference between revisions

no edit summary
(Added Odin variant)
No edit summary
Line 1,385:
'c:\docs' exists
</pre>
 
 
 
=={{header|Frink}}==
This checks that the file exists and is a file, and that the directory exists, and is a directory. (Many of the samples on this page do not check that the files are actually a file or the directories are actually a directory.) It also tries to find various Unicode encodings of the "unusual" filename that may be encoded in different Unicode compositions (e.g. using "precomposed" or "decomposed" representations for some characters.
Line 1,424 ⟶ 1,427:
checkFile[normalizeUnicode[unusual, "NFD"]]
</syntaxhighlight>
 
 
=={{header|FutureBasic}}==
<syntaxhighlight lang="futurebasic">
include "NSLog.incl"
 
CFURLRef url
url = fn URLFileURLWithPath( @"~/Desktop/myTextFile.txt" )
if (fn FileManagerFileExistsAtURL( url ) )
NSLog( @"File already exists." )
else
NSLog( @"File does not exist at this location." )
end if
 
HandleEvents
</syntaxhighlight>
 
 
=={{header|Gambas}}==
'''[https://gambas-playground.proko.eu/?gist=fa06b7cc43166fb0ab48e878d86e3d1b Click this link to run this code]'''
Line 1,446 ⟶ 1,467:
'`Abdu'l-Bahá.txt' does exist (zero length and unusual name)
</pre>
 
 
 
=={{header|GAP}}==
<syntaxhighlight lang="gap">IsExistingFile("input.txt");
717

edits