JavaRush
AI Academy
new
Promotion
Learning
Courses
Tasks
Quizzes
Games
Help
Schedule of nudges
Internship
Community
Users
Forum
Chat
Articles
Activities
Reviews
Subscriptions
Light theme

Lectures

  • Reviews
  • About us
  • CS50
Start
Start learning
Start learning
  • My progress
  • Courses
  • Quest map
  • Lectures
  • Paths in Go: filepath vs path, relative and absolute

    Go SELF
    39 level,0 lecture
    Let’s break down why a path in Go is not “just a string”, how to choose correctly between the path and path/filepath packages, how to build and normalize paths via filepath.Join and filepath.Clean, when to convert relative paths to absolute ones via filepath.Abs, and how to diagnose path issues (the %q format) and errors (wrapping via %w).
    Open
  • Working with files in Go: Open/Create/OpenFile

    Go SELF
    39 level,1 lecture
    We break down file I/O in Go as working with resources: why it’s important to close * os . File via defer, how to place defer correctly after checking err, how os . Open, os . Create, and os . OpenFile differ, and how to use the flags os . O_APPEND, os . O_CREATE, os . O_EXCL. Separately, we discuss the normal io . EOF, common errors, and build a mini example: a “todo in a file”.
    Open
  • os.ReadFile/WriteFile: when it’s OK to read and write

    Go SELF
    39 level,2 lecture
    We’ll break down when it makes sense in Go to read and write a file “all at once” using os.ReadFile and os.WriteFile: why reading returns []byte, how to explicitly convert bytes to text via string and back, how this approach differs from working through os.Open/ Read, and how to build it into a simple TODO app with the functions loadText, parseTasks, saveText.
    Open
  • Data directories — os.MkdirAll, permissions, and safe defaults

    Go SELF
    39 level,3 lecture
    We break down why it is important to prepare the directory structure before writing files, how os.MkdirAll works, what the octal modes 0755/ 0644 and the os.FileMode type mean, and which “safe defaults” to choose for public vs private data. At the end: the “directory → file” protocol, error wrapping via fmt.Errorf, and a walkthrough of common mistakes.
    Open
  • File error classes — not exist, permission, invalid path

    Go SELF
    39 level,4 lecture
    We break down why in Go it’s useful to classify file errors by “classes” ( not exist, permission, invalid path), why you can’t reliably rely on err.Error(), and how to correctly check causes via os.IsNotExist(err), os.IsPermission(err), errors.Is/ errors.As and wrapping with %w. At the end: a mini “todo” example and a set of common mistakes.
    Open
Learn
  • Registration
  • Java course
  • Help with tasks
  • Pricing
Community
  • Users
  • Articles
  • Forum
  • Chat
  • Activities
Company
  • About us
  • Contacts
  • Reviews
  • FAQ
  • Support
JavaRushJavaRush — is an interactive online course for learning Java programming from scratch. It contains 1200 practical tasks with one-click solution checking, the necessary minimum of theory on Java basics, and motivating features that help you complete the course: games, quizzes, interesting projects and articles on effective learning and the career of a Java developer.
Follow us
Язык интерфейса
Русский
English
Українська
"Programmers are not born" © 2026 JavaRush
MastercardVisa
"Programmers are not born" © 2026 JavaRush