Walk a directory/Recursively: Difference between revisions

m
→‎{{header|Dart}}: Further identify dir/file to better perform action
No edit summary
m (→‎{{header|Dart}}: Further identify dir/file to better perform action)
Line 794:
void main(List<String> args) {
var dir = Directory(args[0]);
dir.list(recursive: true, followLinks: false).forEach((final cur) {
if (cur is Directory) {
// perform any action on files/dirs
print(x)"Directory: => print(x${cur.path}"),;
);}
 
if (cur is File) {
print("File: ${cur.path}");
}
});
}
</syntaxhighlight>
3

edits