Reference for Processing version 1.2. If you have a previous version, use the reference included with your software. If you see any errors or have suggestions, please let us know. If you prefer a more technical reference, visit the Processing Javadoc.

Name

selectFolder()

Examples
String folderPath = selectFolder();  // Opens file chooser
if (folderPath == null) {
  // If a folder was not selected
  println("No folder was selected...");
} else {
  // If a folder was selected, print path to folder
  println(folderPath);
}
Description Opens a platform-specific file chooser dialog to select a folder for input. This function returns the full path to the selected folder as a String, or null if no selection.
Syntax
selectFolder()
selectFolder(prompt)
Parameters
prompt String: message you want the user to see in the file chooser
Returns String or null
Usage Application
Related selectOutput()
selectInput()
Updated on June 14, 2010 12:05:29pm EDT

Creative Commons License