public ObjectDirectory Duplicate() { ObjectDirectory ret = new ObjectDirectory(); ret._sddl = _sddl; ret._sd = (byte[])_sd.Clone(); ret._orig_path = _orig_path; ret._full_path = _full_path; ret._entries = new List <ObjectDirectoryEntry>(_entries.Select(e => new ObjectDirectoryEntry(e.ObjectName, e.TypeName, ret))); ret._directory = _directory.Duplicate(); return(ret); }
internal ObjectDirectory(ObjectDirectory root, string object_path) { _orig_path = object_path; if (_orig_path.StartsWith("\\") || root != null) { _directory = OpenPath(root, _orig_path); } else { _directory = OpenNamespace(_orig_path); } PopulateEntries(); }
internal ObjectDirectoryEntry(string name, string type_name, ObjectDirectory directory) { _name = name; _type_name = type_name; _directory = directory; }
private static NtDirectory OpenPath(ObjectDirectory root, string path) { return(NtDirectory.Open(path, root != null ? root._directory : null, DirectoryAccessRights.MaximumAllowed)); }
public static ObjectDirectory OpenDirectory(ObjectDirectory root, string object_path) { return(new ObjectDirectory(root, object_path)); }