Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ferrata/file-scanner-tutorial
https://github.com/ferrata/file-scanner-tutorial
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ferrata/file-scanner-tutorial
- Owner: ferrata
- Created: 2023-12-10T04:40:56.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-11T09:46:17.000Z (8 months ago)
- Last Synced: 2024-05-11T10:43:52.780Z (8 months ago)
- Language: C#
- Size: 104 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# File scanner
## Original task
Create a program that will take a directory path as input, which
After taking the path, it will scan all files from the folder.
Will collect information about files - Id, name, size, full path.
That data will be added to the database (One table with the mentioned
columns: Id, name, size, full path).### Upgrade the app to now scan and visit.
After finding a folder, it will go inside it to scan files further (if
it finds another folder in the folder, it will go inside it).
Every time a folder is found, it will save its name and created Id.
Each file found must have the ID of the folder it belongs to.Suggested database structure:
![image](./assets/suggested-db-structure.png)
### Recursion
Bonus point if you have a database structure where you can create
subfolders of subfolders and trace the entire path from the root
folder to the file.## Solution
We'll solve it in 3 stages:
### Stage 1
Write a simple file scanner that will scan a given directory, print out information about files. See details in [stage-1](./stage-1/README.md).
### Stage 2
Expand the file scanner to also scan subdirectories, still just printing out information about files. See details in [stage-2](./stage-2/README.md).
### Stage 3
Create a database, and change the file scanner to save information about files to the database. See details in [stage-3](./stage-3/README.md).