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

Lectures

  • Reviews
  • About us
  • CS50
Start
Start learning
Start learning
  • My progress
  • Courses
  • Quest map
  • Lectures
  • File Organizer Project

    Kotlin SELF
    46 level,0 lecture
    We define the contract for the File Organizer console utility: which parameters the configuration accepts ( sourceDir, targetDir, allowedExt, dryRun), which modes are specified type-safely via enum ( Mode, ConflictPolicy), how to normalize user input ( trim(), lowercase()), and how to do fail-fast validation via require() before any bulk disk operations. At the end, we outline the result model ( OpResult) and a main skeleton.
    Open
  • Directory traversal: walkTopDown, filters, and relative paths

    Kotlin SELF
    46 level,1 lecture
    We break down a safe “first stage” of File Organizer: how to traverse a directory tree with walkTopDown(), filter to files only via isFile, carefully extract an extension with lastIndexOf, normalize and compare it with allowedExt, and then build a relative path inside the source using Path.relativize(...). At the end, we assemble the CandidateFile model and go over typical mistakes.
    Open
  • Categories, target paths, and conflicts

    Kotlin SELF
    46 level,2 lecture
    We break down a “clean” file layout as a computation: how to determine a category by extension via enum class Category, how to safely build a target path with Path and resolve(), and how to represent name conflicts in the plan ahead of time via PlanItem and PlannedConflict. At the end — practical nuances ( relativize(), checking startsWith()) and common mistakes.
    Open
  • Bulk operations engine: copy/move, partial errors, and results

    Kotlin SELF
    46 level,3 lecture
    We break down how to build a “bulk file operations engine” in Kotlin: we represent processing as a pipeline “plan → operation on a single file → result”, introduce the result model OpResult and statuses Status, learn to collect statistics via groupBy, handle conflicts correctly ( ConflictPolicy), and make processing resilient by using a narrow try/ catch at the single-item level—including cases where renameTo() returns false without throwing an exception.
    Open
  • Safety and reporting

    Kotlin SELF
    46 level,4 lecture
    We break down how to make a file utility more reliable: we add a dry-run mode (planning without real file system changes), write a simple event log to a file via LocalDateTime, and build the final report separately in memory and save it atomically via a temporary file and renameTo(). In practice, we assemble a single workflow using cfg.dryRun, OpResult results, and status grouping via groupBy.
    Open
Learn
  • Registration
  • Java course
  • Help with tasks
  • Pricing
Community
  • Users
  • Articles
  • Forum
  • Chat
  • Success stories
  • 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