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/Kotlin/Library/Files and paths

Kotlin files and paths

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

Files.readStringFiles.sizePath.copyTo

Browse by topic

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

Names and locations

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

Read and write

  • Files.readStringRead a saved shopping note
  • Files.writeStringSave an item to a grocery note
  • Path.readBytes and writeBytesRecover the brightest setting from a preset

Manage files and folders

  • File.walkTopDownFind a receipt below the month folder
  • Path.copyToKeep a separate copy of a receipt
  • Path.createDirectoriesPrepare nested hand-in folders
  • Path.deleteExistingClear a disposable print preview
  • Path.listDirectoryEntriesCount only the invoices in a folder
  • Path.moveToPublish a signed attendance sheet

Inspect files and storage

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

All Kotlin library sections

Kotlin tutorials

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