/// <summary> /// Creates an <see cref="ObservedFileAccess"/> representing zero or more individual accesses to <paramref name="path"/>. /// </summary> public ObservedFileAccess( AbsolutePath path, ObservationFlags observationFlags, CompactSet <ReportedFileAccess> accesses) { Contract.Requires(path.IsValid); m_path = path; m_observationFlags = observationFlags; m_accesses = accesses; }
/// <summary> /// Indicates if this status is specific to injecting detours / sandboxing; Detours and sandboxing-specific failures /// merit an 'internal error' indication rather than suggesting user fault. /// </summary> public static bool IsHashingRequired(this ObservationFlags flag) { // File probes, enumeration, and directory locations are not hashed. // (flag & ObservationFlags.DirectoryLocation) == 0 && // (flag & ObservationFlags.Enumeration) == 0 && // (flag & ObservationFlags.FileProbe) == 0 // If we add a new flag, we should reconsider the logic below and // think about whether we need to hash the paths containing that new flag. return(flag == ObservationFlags.None); }