Pathlib makes file management EASY in Python

Опубликовано: 06 June 2026
на канале: Carberra
5,327
278

Pathlib takes (almost) all the annoying stuff about file management, and makes it easier!

00:00 - Intro
00:54 - Creating a Path instance
02:02 - Resolving relative paths to absolute paths
02:29 - Traversing the file tree
03:52 - Checking a file exists
04:18 - Getting the parts of a filepath
05:12 - Reading from a file
06:14 - Walking through directories
07:42 - Using glob expressions
08:41 - Creating a new directory
09:24 - Writing to a file
10:36 - Updating file permissions
11:37 - Renaming a file
12:02 - Deleting a file
12:42 - Removing a directory
13:34 - Outro

—

~ Hotlinks ~
Join the Discord ►   / discord  
Check out the GitHub ► https://github.com/Carberra

~ Setup ~
Visual Studio Code ►    • My Visual Studio Code setup! (2024)  
Terminal ►    • Make your terminal look AMAZING  
Desk/recording gear ► https://kit.co/Carberra
PC build ► https://uk.pcpartpicker.com/list/TmzGYN

~ Affiliations ~
ChatLLM and CodeLLM ► https://chatllm.abacus.ai/phxDqZSGjZ
Codecrafters (40% off any plan) ► https://app.codecrafters.io/join?via=...
Keeper Password Manager (30% off your first year) ► https://keeper.io/r/EX4FB1C

#python #coding #howto