</>OfferRetriever
DashboardDiscuss
NEW

Spring Hire Sale

Limited Time Deal: Unlock all premium questions for over 30% off

$10.42$7.08

08

:

04

:

44

:

50

Get this deal
Back to Dashboard

Directory Permission Manager

Medium

Design a permission management system for a hierarchical file system. Implement the DirectoryPermissionManager class.

The directory hierarchy is provided as a list of [parent, child] edges at construction time. Permissions propagate downward: granting access to a directory also grants access to all of its subdirectories. Revoking access at a directory removes access to that directory and all of its subdirectories, even if a parent was previously granted access. Grants and revocations can be layered -- a subdirectory can be re-granted after its parent was revoked. ...