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

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
Tutorials/Computer Programming/Go/Library/Files and paths

Go files and paths

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

os.ReadFileos.Stat and FileInfo.Sizeio.Copy

Browse by topic

  • Names and locations3
  • Read and write3
  • Manage files and folders7
  • Inspect files and storage3

Names and locations

  • filepath.Base and DirPrint a receipt name and its folder
  • filepath.Join and BaseBuild a receipt path without hard-coded separators
  • filepath.RelLink a course handout to a diagram
Advertisements

Read and write

  • os.ReadFileRead a saved shopping note
  • os.ReadFile and WriteFileRecover the brightest setting from a preset
  • os.WriteFileSave an item to a grocery note

Manage files and folders

  • filepath.WalkDirFind a receipt below the month folder
  • io.CopyKeep a separate copy of a receipt
  • os.MkdirAllPrepare nested hand-in folders
  • os.MkdirTempIsolate two simultaneous label previews
  • os.ReadDirCount only the invoices in a folder
  • os.RemoveClear a disposable print preview
  • os.RenamePublish a signed attendance sheet

Inspect files and storage

  • os.ChtimesRestore a newsletter publication date
  • os.Stat and FileInfo.SizeCheck a receipt attachment size
  • os.Stat and FileMode.IsRegularTell an uploaded file apart from its folder

All Go library sections

Go tutorials

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