https://github.com/marcellodesales/in-memory-fs-coinbase
Design an in-memory file-system problem
https://github.com/marcellodesales/in-memory-fs-coinbase
Last synced: over 1 year ago
JSON representation
Design an in-memory file-system problem
- Host: GitHub
- URL: https://github.com/marcellodesales/in-memory-fs-coinbase
- Owner: marcellodesales
- Created: 2022-03-30T04:25:43.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-03-30T04:38:56.000Z (over 4 years ago)
- Last Synced: 2025-02-03T10:46:22.717Z (over 1 year ago)
- Language: Python
- Size: 16.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# In-memory File-system Problem
This is an implementation of an in-memory file-system + Web Service.
> Problem asked during interviews with Coinbase
# Setup
pip install -r requirements.txt
# Core
> Support: features implemented
* mkdir: creates dir
* write_file: creates file
* read_file: read contents
* read_dir: list the contents of dir
# API
Run ws.py and go to `localhost:8000/docs`

## HTTP POST /fs/{path}
> creates new dir or file
## HTTP GET /fs/{path}
> retrieves info about dir or file
## HTTP HEAD /fs/{path}
> verifies if the given path exists
## HTTP DELETE: /fs/{path}
> deletes the given path if it's file or empty dir