vfs layers 1/2
This commit is contained in:
parent
c2ae4435e4
commit
0dcfbf919c
@ -115,6 +115,36 @@ export enum NODE_FIELDS {
|
||||
SHOW_MEDIA_INFO = 1637
|
||||
}
|
||||
|
||||
export interface VfsBind {
|
||||
id: string;
|
||||
source: {
|
||||
mount: string;
|
||||
subpath?: string;
|
||||
};
|
||||
target: {
|
||||
mount: string;
|
||||
path: string;
|
||||
};
|
||||
readonly?: boolean;
|
||||
acl?: 'source' | 'inherit';
|
||||
}
|
||||
|
||||
export class BindManager {
|
||||
private binds: VfsBind[];
|
||||
|
||||
constructor(binds: VfsBind[]) {
|
||||
this.binds = binds;
|
||||
}
|
||||
|
||||
getAll(): VfsBind[] {
|
||||
return this.binds;
|
||||
}
|
||||
|
||||
findByHostMount(mountName: string): VfsBind[] {
|
||||
return this.binds.filter(b => b.target.mount === mountName);
|
||||
}
|
||||
}
|
||||
|
||||
export class MountManager {
|
||||
private mounts: IMount[];
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user