Giter Club home page Giter Club logo

ssp-02-002-fileio-exp's Introduction

SSP-02-002-FileIO-Exp

Experimenting with Node.js FileIO Capabilities

  • app-read-current-directory-files.js
    • This file is the basis for all of the rest of the files in this repository. It reads in all of the files in the current directory, and logs their names out to the console. Any files that have been added to the "ignoreFiles.txt" file will be ignored, and their contents (or names) will not be read in. This is so that files such as my JavaScript, README and .git files will not be effected by anything I do in any of these apps
  • app-readFilesInOrder-aSync.js
  • Reading in all the files in the current directory using fs.readDir(), storing their filename, contents, time requested and order returned values as an object in a global array. Using a custom .sort() function to sort these based on the time they were requested (once all files have been read in), and then writing the results of all the file's into a new file called "search-results-app-readFilesInOrder-aSync.txt" using the fs.writeFile() method
  • app-readFilesInReverseOrder-aSync.js
    • Same as app-readFilesInOrder-aSync.js but reversing the order the files are written out using my custom sort function
  • app-copyAllFiles-addLines-watch-newDir.js
    • Using the fs.watch() method to watch my current directory, and if a change is made to any of the file, use the fs.mkdir() method to make a new directory with the name "BACKUP" plus the current epoch time, and save a copy of the new file in there using the fs.readFile() and fs. writeFile() methods.
  • app-copyAllFiles.js
    • Copying all files, adding "COPY" to their current filename, using the fs.readFile() and fs.writeFile() methods.
  • app-copyAllFiles-addLines.js
    • Same as app-copyAllFiles.js except adding a line to the beginning and end of the copied file, stating that this is a copy, as well as the date and time it was copied
  • app-appendToFile.js
    • Using the fs.appendFile() method to add a new line to the end of each document in the current directory
  • app-readFiles-Sync.js

ssp-02-002-fileio-exp's People

Contributors

pigottlaura avatar

Watchers

James Cloos avatar  avatar

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.