← Back
00:00

Cloud File Storage System

Ramp interview questions · Hard · OA round · 7 tests

Implement a simple in-memory cloud storage system. The system stores only file metadata, not real filesystem contents, and each file is uniquely identified by its full path-like name.

Interface

class CloudFileStorage {
  addFile(path: string, size: number): boolean;
  copyFile(fromPath: string, toPath: string): boolean;
  getFileSize(path: string): number | null;
  findFile(prefix: string, suffix: string): string[];
}

Rules

Idle