This is an Node.js package designed for obtaining file info. It is a lab for the DPS909 - Open Source class at Seneca College, and it is meant for practising creating projects on GitHub, using and contributing to GitHub, as well as documenting.
- Print the name of a given filename without the absolute path
- Print the size of a given filename in MB
- Create a hash key from Sha1 digest
- Create a hash key from MD5 digest
- Clone repo using Terminal with
git clone https://github.com/mmBabol/file-info.git
- Navigate into the directory with
cd file-info
- Install node modules with
npm install
Once installed and ready to use, simply call the desired function and filename as argument. From the file-info directory, run npm start
to run all of the functions one after the other. This will display the results and how the programs run. To test a function alone, enter node src/size.js [txt file name & location]
.
To run all tests:
- Navigate to the test directory from root with
cd test
- Run the tests with
npm test
This will perform the tests on all the functions (Name, Size, Md5, and Sha1)
Contents | Location |
---|---|
Source files | src |
Test Unit | test |
Issues | issues |