Walk a directory/Non-recursively: Difference between revisions

no edit summary
m (Changed to do syntax)
No edit summary
Line 885:
graphicalSieve.frink
...
</pre>
 
=={{header|FutureBasic}}==
<syntaxhighlight lang="futurebasic">
include "NSLog.incl"
 
void local fn EnumerateDirectoryAtURL( dirURL as CFURLRef )
NSDirectoryEnumerationOptions options = NSDirectoryEnumerationSkipsPackageDescendants + ¬
NSDirectoryEnumerationSkipsHiddenFiles + ¬
NSDirectoryEnumerationSkipsSubdirectoryDescendants
DirectoryEnumeratorRef enumerator = fn FileManagerEnumeratorAtURL( dirURL, NULL, options, NULL, NULL )
CFURLRef url = fn EnumeratorNextObject( enumerator )
while ( url )
if ( fn StringIsEqual( fn URLPathExtension( url ), @"fb" ) )
NSLog(@"%@",fn URLLastPathComponent( url ))
end if
url = fn EnumeratorNextObject( enumerator )
wend
end fn
 
fn EnumerateDirectoryAtURL( fn FileManagerURLForDirectory( NSDesktopDirectory, NSUserDomainMask ) )
 
HandleEvents
</syntaxhighlight>
 
{{out}}
<pre>
ListFormatter.fb
ObjectProperty1.fb
Archimedean Spiral with Bezier Curve.fb
FB3D.fb
lenArray.fb
Rosettacode Random Noise v04.fb
AssociatedObject.fb
</pre>
 
416

edits