Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

getdirectories ???  RSS feed

 
R Ludington
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to get getdirectories to work but am getting an error with the following test code:
String working_dir = "C:\\javacode\\";

String[] directories = Directory.GetDirectories(working_dir);
About unable to resolve Directory

Have I forgottn to import something ???
 
Joe Ess
Bartender
Posts: 9425
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't import Directory. There's no such thing in the Java API. Perhaps you wanted java.io.File.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!