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
  • Creating and deleting files and folders

    JAVA 25 SELF
    40 level,0 lecture
    A practical introduction to Java’s file API: working with java.nio.file, creating files and directories via Files.createFile, Files.createDirectory and Files.createDirectories, deleting — using Files.delete and Files.deleteIfExists. We will discuss existence checks ( Files.exists, Path.of), common exceptions ( FileAlreadyExistsException, NoSuchFileException, DirectoryNotEmptyException, IOException) and safe deletion, including recursive deletion for non-empty directories.
    Open
  • Copying and moving files and folders

    JAVA 25 SELF
    40 level,1 lecture
    How to copy, move, and rename files and folders using Files.copy and Files.move from the java.nio.file package; which options to use ( StandardCopyOption.REPLACE_EXISTING, COPY_ATTRIBUTES, atomic move), how copy differs from move, and how to properly handle exceptions: FileAlreadyExistsException, AccessDeniedException, AtomicMoveNotSupportedException, NoSuchFileException. Plus practical tips and tables for the key methods and options.
    Open
  • Bulk file operations

    JAVA 25 SELF
    40 level,2 lecture
    Hands-on file processing with NIO.2: how to traverse directories with Files.list and Files.walk, filter streams of paths with Stream<Path> and the operations filter, sorted, limit. Bulk actions: copying ( Files.copy), deleting ( Files.delete), renaming ( Files.move) with safe error handling in a loop and performance considerations for recursive traversal. A table of key methods and a “Common mistakes” section will help you avoid pitfalls.
    Open
  • Working with temporary files and directories

    JAVA 25 SELF
    40 level,3 lecture
    In this lecture, we cover how to safely create and clean up temporary resources: files via Files.createTempFile and directories via Files.createTempDirectory, where they go by default and how to specify your own folder. We’ll show reliable deletion using Files.delete/ Files.deleteIfExists, when the legacy method File.deleteOnExit() is appropriate, how to get the path to the system temp folder via System.getProperty( "java.io.tmpdir"), and why it’s important to use try- finally for guaranteed cleanup. We’ll finish with practical tips and common pitfalls.
    Open
  • Monitoring file system changes: WatchService

    JAVA 25 SELF
    40 level,4 lecture
    In the lecture we cover the NIO.2 file system watching API — WatchService: how to obtain the service, register a directory via Path.register(...), what events are available ( ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY), and how to organize the processing loop ( WatchService.take() → key.pollEvents() → key.reset()). We’ll discuss limitations (no recursive watching by default), specifics on Windows/Linux/macOS, real-world examples, and common mistakes.
    Open
Courses
  • Java Course
  • Python Course
  • Development with Claude Code
  • All 16 courses
University
  • Java FullStack
  • Python FullStack
  • AI Native Developer
  • Web FullStack
Community
  • Articles
  • Forum
  • Help with Tasks
Company
  • About us
  • Contacts
  • Reviews
  • Pricing
  • Questions and answers
JavaRush JavaRush: online courses in Java and other programming languages, where you learn by solving tasks. We started in 2012 with a Java course, and today there are 16 courses: Java and Spring, Python, web development, SQL, Go, C#, C++, Kotlin, Swift, Docker and AI development. More than 10,000 tasks with instant checks, and the first level of any course is free. Learn on your own or with a mentor at JavaRush University.
Follow us
Язык интерфейса
Русский
English
Українська
"Programmers are not born" © 2026 JavaRush Terms of Use and Privacy policy
MastercardVisa
"Programmers are not born" © 2026 JavaRush Terms of Use and Privacy policy