</>OfferRetriever
DashboardDiscuss
NEW

July 4th Sale

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

$10.42$6.25

10

:

09

:

27

:

02

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