Skip to content
bbminfo – Learn from Scratch
Subjects Code examples Library reference
Computer Programming Python Java C++ C Go PHP Kotlin Ruby R Scala Groovy Rust Dart Mojo Zig Julia Swift C# JavaScript TypeScript

Tutorial menu

Subjects

Computer Programming MathsPlanned ChemistryPlanned

Lesson contents

Programming resources

All languages Code examples Library reference

Programming languages

Python Java C++ C Go PHP Kotlin Ruby R Scala Groovy Rust Dart 🔥 Mojo Zig Julia Swift C# JavaScript TypeScript
Tutorials/Computer Programming/Scala/Library/Files and paths

Scala files and paths

Build a receipt path, save a note, or read a shopping list.

Files.readStringFiles.sizeFiles.copy

Browse by topic

  • Names and locations3
  • Read and write3
  • Manage files and folders6
  • Inspect files and storage2

Names and locations

  • Path.getFileName and getParentPrint a receipt name and its folder
  • Path.relativizeLink a course handout to a diagram
  • Path.resolve and getFileNameBuild a receipt path without hard-coded separators
Advertisements

Read and write

  • Files.readAllBytesRecover the brightest setting from a preset
  • Files.readStringRead a saved shopping note
  • Files.writeStringSave an item to a grocery note

Manage files and folders

  • Files.copyKeep a separate copy of a receipt
  • Files.createDirectoriesPrepare nested hand-in folders
  • Files.deleteClear a disposable print preview
  • Files.movePublish a signed attendance sheet
  • Using.resource with Files.listCount only the invoices in a folder
  • Using.resource with Files.walkFind a receipt below the month folder

Inspect files and storage

  • Files.isRegularFile and isDirectoryTell an uploaded file apart from its folder
  • Files.sizeCheck a receipt attachment size

All Scala library sections

Scala tutorials

Environment setup› Library reference› Data structures›
Advertisements
bbminfo – Learn from Scratch
© 2026 bbminfoArtwork creditsPrivacy policy