Beginner's Guide to Rust Filesystem APIs 🦀 Rust Tutorial

Ғылым және технология

One of the most common operations you'll need, as a Rust developer, is the ability to read and write to the local filesystem. The standard library in Rust provides the essential functions to create / remove / rename directories, create / read / write / delete files, create symlinks, validate filesystem paths, and more. Let's dive into some of the core filesystem functionality provided by Rust!
🤯 Rust Programming Playlist 🦀 • Rust Programming Tutor...
📖 Rust std::fs docs ➡️ doc.rust-lang.org/std/fs/inde...
Visual Studio Code ➡️ code.visualstudio.com
Rust Website ➡️ rust-lang.org
Rustup Installer ➡️ rustup.rs
Rust Docs ➡️ doc.rust-lang.org/book
Please follow me on these other social channels!
➡️ trevorsullivan.net
➡️ github.com/pcgeek86
➡️ / pcgeek86
➡️ / trevorsullivan
➡️ / trevorsoftware
➡️ tiktok.com/pcgeek86
All trademarks, logos and brand names are the property of their respective owners. All company, product and service names used in this website are for identification purposes only. Use of these names,trademarks and brands does not imply endorsement.
#rustlang #rust #rustdev #opensource #software #linux #devops #programming #rusty #dev #coding #codinglife #code #coder #ubuntu #ubuntulinux #appdev #developer

Пікірлер: 25

  • @tomaszsosinski5935
    @tomaszsosinski59358 ай бұрын

    Hi Trevor, thank you for creating this content. I would like to make one comment about the video. I believe reading raw bytes from file and converting them to chars and string via fold on iterator might be a bit daunting to some viewers. I see the value in it as it shows low level mechanism, however, I would add another minute or two to video to show `std::fs::read_to_string` function that does conversion of bytes to String behind the scenes. I also think that the video on `std::fs::File` should contain examples on using `std::io::BufReader` to read contents of file to a Vec.

  • @TrevorSullivan

    @TrevorSullivan

    8 ай бұрын

    Hello Tomas, that's a good idea! Thank you for taking the time to write out your thoughts. I agree that reading raw bytes from a file can be daunting for someone who's new to programming. Cheers 🙂

  • @Gruby7C1h
    @Gruby7C1h7 ай бұрын

    Small correction for part around 24:07 -> the std::fs::write does return useful info (try to create a file in unexisting directory for example). You only see unit as a result because here the result is actually std::io::Result which always has std::io::Error as Err value. Nice channel btw :)

  • @aintnochange

    @aintnochange

    5 ай бұрын

    So the () inside the Ok(()) variant means something like None of the Option type, right? I mean, it doesn't really wrap anything in this case, but there's still an oporunity for Ok(T) to do that

  • @marlonsbardelatti202
    @marlonsbardelatti2029 ай бұрын

    the quality of your content is really great, apreciate it bro

  • @aintnochange
    @aintnochange5 ай бұрын

    I'm so surprised how useful and consistent Rust's std crate is. Thanks for the video!

  • @kafuu1
    @kafuu17 күн бұрын

    u are the hero

  • @AhmedFalih-kj3tt
    @AhmedFalih-kj3tt9 ай бұрын

    very exciting video, I really appreciate your videos man, thank you alot

  • @deverse
    @deverse8 ай бұрын

    loving this channel

  • @nicolaswolyniec1354
    @nicolaswolyniec13549 ай бұрын

    thanks for the video! I enjoyed it!

  • @JOHNSMITH-ve3rq
    @JOHNSMITH-ve3rq9 ай бұрын

    Loving this channel bro. The geek vibes are off the charts and it’s beautiful. And super educational!!

  • @nhwhn
    @nhwhn3 ай бұрын

    thank you for the great contents

  • @pratikkulkarni891
    @pratikkulkarni8917 ай бұрын

    Thank you.

  • @daniil2704
    @daniil27046 ай бұрын

    35:00 String::from_utf8(read_result.unwrap())

  • @user-qf1qb2mx4x
    @user-qf1qb2mx4x7 күн бұрын

    great!

  • @fedenfer
    @fedenfer9 ай бұрын

    Hello brother, greetings from Argentina, are you managing infrastructure with rust? Or do you prefer other languages, such as python or golang?

  • @TrevorSullivan

    @TrevorSullivan

    9 ай бұрын

    Hello! Thanks for your question. I am not currently using Rust to manage infrastructure, but I think it would be an excellent language to use for that purpose! If you are wanting to use something "off the shelf," then Salt, Ansible, and existing tooling might be your best bet though.

  • @736939
    @7369392 ай бұрын

    But how to read and write binary files like in python with pickle? For example, if İ want to save an object data.

  • @TrevorSullivan

    @TrevorSullivan

    2 ай бұрын

    That's a great question! Great idea for another video

  • @736939

    @736939

    2 ай бұрын

    @@TrevorSullivan Thank you, it would be the great tutorial :)

  • @piyushpatil6874
    @piyushpatil68742 ай бұрын

    Love from India ❤❤❤

  • @maylay3775
    @maylay37758 ай бұрын

    perfect an hour on 0.75 playback speed

  • @aryabp
    @aryabp9 ай бұрын

    please integrate with actix and make google drive clone

  • @ChidleyITCompute-ye7hc
    @ChidleyITCompute-ye7hc3 ай бұрын

    This is very helpful. Thankfully rust handles utf8. I learned a lot from this (and your other) video: that's my goal and you're delivering it.

  • @TrevorSullivan

    @TrevorSullivan

    3 ай бұрын

    Thanks so much for your kind comment! 😊❤️🦀

Келесі