From e558504b8407b8efc61054104d10068410091075 Mon Sep 17 00:00:00 2001 From: Shaopeng Li Date: Tue, 16 Apr 2024 12:24:00 -0700 Subject: [PATCH] Add comment --- src/Sarif/FileSystem.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Sarif/FileSystem.cs b/src/Sarif/FileSystem.cs index dec5479ca..a8d526cd6 100644 --- a/src/Sarif/FileSystem.cs +++ b/src/Sarif/FileSystem.cs @@ -399,6 +399,9 @@ public long FileInfoLength(string path) /// public bool IsSymbolicLink(string path) { + // https://learn.microsoft.com/en-us/dotnet/api/system.io.fileattributes + // While symbolic links will have the ReparsePoint flag set, not all reparse points represent symbolic links. + // This is a basic implementation. var fileInfo = new FileInfo(path); return (fileInfo.Attributes & FileAttributes.ReparsePoint) == FileAttributes.ReparsePoint; }