How to Read a Directory in Scala

The Scala programming language runs on the Java platform. A command line interface, as opposed to a graphical one, on the computer that the program resides, is used for issuing orders to the program. To read a directory of files in Scala, access the command line interface. The procedure is straightforward.

Instructions

    • 1

      Click “Start.” Select “All Applications” from the pop-up menu. Select “Scala” from the submenu attached to “All Applications.” Do nothing until the command line interface window appears on the screen.

    • 2

      Enter the following exactly, without the quotes or period, in the command line interface text line: “if (lfile.isDirectory) {.

    • 3

      Press the “Enter” key once. Let the text scroll up inside the window. Once the text has stopped scrolling, read the directory listing that is now inside the Scala command line interface window.

Related Searches:

References

Resources

Comments

Related Ads

Featured