include "NSLog.incl" CFURLRef url url = fn URLFileURLWithPath( fn StringByExpandingTildeInPath(@"~/Desktop/input.txt") ) if (fn FileManagerFileExistsAtURL( url ) ) NSLog( @"File \"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