Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
shaopeng-gh committed Apr 16, 2024
1 parent 5b97caf commit e558504
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Sarif/FileSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,9 @@ public long FileInfoLength(string path)
/// </returns>
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;
}
Expand Down

0 comments on commit e558504

Please sign in to comment.