An open API service indexing awesome lists of open source software.

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

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`

Screen Shot 2022-03-29 at 9 33 50 PM

## 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