Git Product home page Git Product logo

files-handling's Introduction

Files Handling

Project Description

This project contains some exercises to practice Reading, Writing, Creating, Copying, and some more use cases when handling files with Go.

Key scenarios

  1. pathExists/: Check if a given path truly exists.
  2. isFile/: Check if a given path is a regular file.
  3. isDirectory/: Check if a given path is a directory.
  4. readFull/: Read a complete file at once .
  5. readByLine/: Read a file line by line.
  6. readByWord/: Read a file word by word.
  7. readByChar/: Read a file character by character.
  8. createFile/: Program for creating a new file.
  9. copyFile/: Program to create a new file as a copy of another one.
  10. writeFile/: Program for creating a file and writing some data within.
  11. appendData/: Program for adding some new data in an existing file.
  12. catData/: Program for printing on the terminal the content of a file.

Accessories

You can always use the ./tmp/data.txt file when testing the programs.

Recommendations

If you are beginning to learn Go, I recommend you to first check the basic Golang repos I have built to lay the foundation. Then come back and check these programs:

Acknowledgements

Thanks to Linode for the amazing article explaining these exercises. You can check the article here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.