import * as pathing from "../path.js";
/**
 * Path for `AppInfo`.
 */
export function appDataPath(app) {
    return pathing.directory(pathing.Branch.Private, "Apps", app.creator, app.name);
}
/**
 * Lists the filesystems paths for a set of `Permissions`.
 * This'll return a list of `DistinctivePath`s.
 */
export function paths(permissions) {
    let list = [];
    if (permissions.app)
        list.push(appDataPath(permissions.app));
    if (permissions.fs?.private)
        list = list.concat(permissions.fs?.private.map(p => pathing.combine(pathing.directory(pathing.Branch.Private), p)));
    if (permissions.fs?.public)
        list = list.concat(permissions.fs?.public.map(p => pathing.combine(pathing.directory(pathing.Branch.Public), p)));
    return list;
}
//# sourceMappingURL=permissions.js.map