File System Navigator Challenge

Meetup: Wildcard Wizards Date: 2024-10-05

Background

You're tasked with creating a file system navigator for a Unix-like system. The navigator should parse a list of file paths and generate a structured representation of the file system.

Challenge

Write a script that takes a list of file paths as input and produces a nested dictionary representing the file system structure. Each file should be represented as a dictionary/hash with metadata including type, size, date, and time.

Requirements

  1. No imports allowed. Except for final line for Data Dumper / pprint.

  2. Bonus points for conciseness.

  3. Input will be a list of strings, each representing a file path.

  4. Output should be a nested dictionary/hash representing the file system structure.

  5. No AI or internet help - this must be solved by human hands!

Example Input

Example Output

Evaluation Criteria

  1. Correctness: The solution must correctly parse the input and generate the required output structure.

  2. Conciseness: Shorter, more elegant solutions will be favored.

  3. Efficiency: The solution should be able to handle large inputs efficiently.

  4. Adherence to requirements: No imports should be used.

Good luck!