This mapping has 10 all-to-all groups: every node on one side corresponds to every node on the other, and none is deleted or inserted. Each member carries an all N:M badge; selecting one highlights all of its counterparts, in the tree and in the code view alike.

Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–248 unchanged (248 lines)
249 };
250
251 if (result.Exists)
252 {
253 result.IsDirectory = info is DirectoryInfo || (info.Attributes & FileAttributes.Directory) == FileAttributes.Directory;
254
255 // if (!result.IsDirectory)
256 // {
257 // result.IsHidden = (info.Attributes & FileAttributes.Hidden) == FileAttributes.Hidden;
258 // }
259
260 if (info is FileInfo fileInfo)
261 {
262 result.Length = fileInfo.Length;
263
264 // Issue #2354 get the size of files behind symbolic links. Also Enum.HasFlag is bad as it boxes!
265 if ((fileInfo.Attributes & FileAttributes.ReparsePoint) == FileAttributes.ReparsePoint)
266 {
267 try
268 {
269 using (var fileHandle = File.OpenHandle(fileInfo.FullName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
270 {
271 result.Length = RandomAccess.GetLength(fileHandle);
272 }
273 }
274 catch (FileNotFoundException ex)
275 {
276 // Dangling symlinks cannot be detected before opening the file unfortunately...
277 _logger.LogError(ex, "Reading the file size of the symlink at {Path} failed. Marking the file as not existing.", fileInfo.FullName);
278 result.Exists = false;
279 }
280 catch (UnauthorizedAccessException ex)
281 {
282 _logger.LogError(ex, "Reading the file at {Path} failed due to a permissions exception.", fileInfo.FullName);
283 }
284 catch (IOException ex)
285 {
286 // IOException generally means the file is not accessible due to filesystem issues
287 // Catch this exception and mark the file as not exist to ignore it
288 _logger.LogError(ex, "Reading the file at {Path} failed due to an IO Exception. Marking the file as not existing", fileInfo.FullName);
289 result.Exists = false;
290 }
291 }
292 }
293
294 result.CreationTimeUtc = GetCreationTimeUtc(info);
295 result.LastWriteTimeUtc = GetLastWriteTimeUtc(info);
296 }
297 else
298 {
299 result.IsDirectory = info is DirectoryInfo;
300 }
301
…lines 302–714 unchanged (413 lines)

After

…lines 1–247 unchanged (247 lines)
248 Name = info.Name
249 };
250
251 if (result.Exists)
252 {
253 result.IsDirectory = info is DirectoryInfo || (info.Attributes & FileAttributes.Directory) == FileAttributes.Directory;
254
255 if (info is FileInfo fileInfo)
256 {
257 result.CreationTimeUtc = GetCreationTimeUtc(info);
258 result.LastWriteTimeUtc = GetLastWriteTimeUtc(info);
259 if (fileInfo.LinkTarget is not null)
260 {
261 try
262 {
263 var targetFileInfo = (FileInfo?)fileInfo.ResolveLinkTarget(returnFinalTarget: true);
264 if (targetFileInfo is not null)
265 {
266 result.Exists = targetFileInfo.Exists;
267 if (result.Exists)
268 {
269 result.Length = targetFileInfo.Length;
270 result.CreationTimeUtc = GetCreationTimeUtc(targetFileInfo);
271 result.LastWriteTimeUtc = GetLastWriteTimeUtc(targetFileInfo);
272 }
273 }
274 else
275 {
276 result.Exists = false;
277 }
278 }
279 catch (UnauthorizedAccessException ex)
280 {
281 _logger.LogError(ex, "Reading the file at {Path} failed due to a permissions exception.", fileInfo.FullName);
282 }
283 }
284 else
285 {
286 result.Length = fileInfo.Length;
287 }
288 }
289 }
290 else
291 {
292 result.IsDirectory = info is DirectoryInfo;
293 }
…lines 294–707 unchanged (414 lines)

Before

compilation_unit
using_directive
using "using"
identifier "System"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "System"
. "."
identifier "Collections"
. "."
identifier "Generic"
; ";"
using_directive
using "using"
qualified_name
identifier "System"
. "."
identifier "Globalization"
; ";"
using_directive
using "using"
qualified_name
identifier "System"
. "."
identifier "IO"
; ";"
using_directive
using "using"
qualified_name
identifier "System"
. "."
identifier "Linq"
; ";"
using_directive
using "using"
qualified_name
identifier "System"
. "."
identifier "Security"
; ";"
using_directive
using "using"
qualified_name
identifier "Jellyfin"
. "."
identifier "Extensions"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "MediaBrowser"
. "."
identifier "Common"
. "."
identifier "Configuration"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "MediaBrowser"
. "."
identifier "Model"
. "."
identifier "IO"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "Microsoft"
. "."
identifier "Extensions"
. "."
identifier "Logging"
; ";"
namespace_declaration
namespace "namespace"
qualified_name
qualified_name
qualified_name
identifier "Emby"
. "."
identifier "Server"
. "."
identifier "Implementations"
. "."
identifier "IO"
declaration_list
{ "{"
comment "/// <summary>"
comment "/// Class ManagedFileSystem."
comment "/// </summary>"
class_declaration
modifier
public "public"
class "class"
identifier "ManagedFileSystem"
base_list
: ":"
identifier "IFileSystem"
declaration_list
{ "{"
field_declaration (+21 nodes collapsed)
field_declaration (+255 nodes collapsed)
field_declaration
modifier
private "private"
modifier
readonly "readonly"
variable_declaration
generic_name
identifier "ILogger"
type_argument_list
< "<"
identifier "ManagedFileSystem"
> ">"
variable_declarator
identifier "_logger"
; ";"
field_declaration
modifier
private "private"
modifier
readonly "readonly"
variable_declaration
generic_name
identifier "List"
type_argument_list
< "<"
identifier "IShortcutHandler"
> ">"
variable_declarator
identifier "_shortcutHandlers"
; ";"
field_declaration
modifier
private "private"
modifier
readonly "readonly"
variable_declaration
predefined_type "string"
variable_declarator
identifier "_tempPath"
; ";"
comment "/// <summary>"
comment "/// Initializes a new instance of the <see cref=\"ManagedFile"...
comment "/// </summary>"
comment "/// <param name=\"logger\">The <see cref=\"ILogger\"/> instance "...
comment "/// <param name=\"applicationPaths\">The <see cref=\"IApplicati"...
comment "/// <param name=\"shortcutHandlers\">the <see cref=\"IShortcutH"...
constructor_declaration (+59 nodes collapsed)
comment "/// <summary>"
comment "/// Determines whether the specified filename is shortcut."
comment "/// </summary>"
comment "/// <param name=\"filename\">The filename.</param>"
comment "/// <returns><c>true</c> if the specified filename is shortc"...
comment "/// <exception cref=\"ArgumentNullException\"><paramref name=\""...
method_declaration (+83 nodes collapsed)
comment "/// <summary>"
comment "/// Resolves the shortcut."
comment "/// </summary>"
comment "/// <param name=\"filename\">The filename.</param>"
comment "/// <returns>System.String.</returns>"
comment "/// <exception cref=\"ArgumentNullException\"><paramref name=\""...
method_declaration (+105 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+252 nodes collapsed)
comment "/// <summary>"
comment "/// Creates the shortcut."
comment "/// </summary>"
comment "/// <param name=\"shortcutPath\">The shortcut path.</param>"
comment "/// <param name=\"target\">The target.</param>"
comment "/// <exception cref=\"ArgumentNullException\">The shortcutPath"...
method_declaration (+146 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+173 nodes collapsed)
comment "/// <summary>"
comment "/// Returns a <see cref=\"FileSystemMetadata\"/> object for th"...
comment "/// </summary>"
comment "/// <param name=\"path\">A path to a file or directory.</param"...
comment "/// <returns>A <see cref=\"FileSystemMetadata\"/> object.</ret"...
comment "/// <remarks>If the specified path points to a directory, th"...
comment "/// <see cref=\"FileSystemMetadata.IsDirectory\"/> property wi"...
method_declaration (+146 nodes collapsed)
comment "/// <summary>"
comment "/// Returns a <see cref=\"FileSystemMetadata\"/> object for th"...
comment "/// </summary>"
comment "/// <param name=\"path\">A path to a file.</param>"
comment "/// <returns>A <see cref=\"FileSystemMetadata\"/> object.</ret"...
comment "/// <remarks><para>If the specified path points to a directo"...
comment "/// <see cref=\"FileSystemMetadata.IsDirectory\"/> property an"...
comment "/// <para>For automatic handling of files <b>and</b> directo"...
method_declaration (+42 nodes collapsed)
comment "/// <summary>"
comment "/// Returns a <see cref=\"FileSystemMetadata\"/> object for th"...
comment "/// </summary>"
comment "/// <param name=\"path\">A path to a directory.</param>"
comment "/// <returns>A <see cref=\"FileSystemMetadata\"/> object.</ret"...
comment "/// <remarks><para>If the specified path points to a file, t"...
comment "/// <see cref=\"FileSystemMetadata.IsDirectory\"/> property wi"...
comment "/// <para>For automatic handling of files <b>and</b> directo"...
method_declaration (+42 nodes collapsed)
method_declaration
modifier
private "private"
identifier "FileSystemMetadata"
identifier "GetFileSystemMetadata"
parameter_list
( "("
parameter
identifier "FileSystemInfo"
identifier "info"
) ")"
block
{ "{"
local_declaration_statement (+45 nodes collapsed)
if_statement
if "if"
( "("
member_access_expression
identifier "result"
. "."
identifier "Exists"
) ")"
block
{ "{"
expression_statement (+34 nodes collapsed)
comment "// if (!result.IsDirectory)"
comment "// {"
comment "// result.IsHidden = (info.Attributes & FileAttributes.Hi"...
comment "// }"
if_statement
if "if"
( "("
is_pattern_expression
identifier "info"
is "is"
declaration_pattern
identifier "FileInfo"
identifier "fileInfo"
) ")"
block
{ "{"
expression_statement
assignment_expression
member_access_expression
identifier "result"
. "."
identifier "Length"
= "="
member_access_expression
identifier "fileInfo"
. "."
identifier "Length"
; ";"
comment "// Issue #2354 get the size of files behind symbolic links. "...
if_statement
if "if"
( "("
binary_expression
parenthesized_expression
( "("
binary_expression
member_access_expression
identifier "fileInfo"
. "."
identifier "Attributes"
& "&"
member_access_expression
identifier "FileAttributes"
. "."
identifier "ReparsePoint"
) ")"
== "=="
member_access_expression
identifier "FileAttributes"
. "."
identifier "ReparsePoint"
) ")"
block
{ "{"
try_statement
try "try"
block
{ "{"
using_statement
using "using"
( "("
variable_declaration
implicit_type
var "var"
variable_declarator
identifier "fileHandle"
= "="
invocation_expression
member_access_expression
identifier "File"
. "."
identifier "OpenHandle"
argument_list
( "("
argument
member_access_expression
identifier "fileInfo"
. "."
identifier "FullName"
, ","
argument
member_access_expression
identifier "FileMode"
. "."
identifier "Open"
, ","
argument
member_access_expression
identifier "FileAccess"
. "."
identifier "Read"
, ","
argument
member_access_expression
identifier "FileShare"
. "."
identifier "ReadWrite"
) ")"
) ")"
block
{ "{"
expression_statement
assignment_expression
member_access_expression
identifier "result"
. "."
identifier "Length"
= "="
invocation_expression
member_access_expression
identifier "RandomAccess"
. "."
identifier "GetLength"
argument_list
( "("
argument
identifier "fileHandle"
) ")"
; ";"
} "}"
} "}"
catch_clause
catch "catch"
catch_declaration
( "("
identifier "FileNotFoundException"
identifier "ex"
) ")"
block
{ "{"
comment "// Dangling symlinks cannot be detected before opening the f"...
expression_statement
invocation_expression
member_access_expression
identifier "_logger"
. "."
identifier "LogError"
argument_list
( "("
argument
identifier "ex"
, ","
argument
string_literal
" "\""
string_literal_content "Reading the file size of the symlink at {Path} failed. Marki"...
" "\""
, ","
argument
member_access_expression
identifier "fileInfo"
. "."
identifier "FullName"
) ")"
; ";"
expression_statement all 2:1
assignment_expression all 2:1
member_access_expression all 2:1
identifier "result" all 2:1
. "." all 2:1
identifier "Exists" all 2:1
= "=" all 2:1
boolean_literal all 2:1
false "false" all 2:1
; ";" all 2:1
} "}"
catch_clause (+34 nodes collapsed)
catch_clause
catch "catch"
catch_declaration
( "("
identifier "IOException"
identifier "ex"
) ")"
block
{ "{"
comment "// IOException generally means the file is not accessible du"...
comment "// Catch this exception and mark the file as not exist to ig"...
expression_statement
invocation_expression
member_access_expression
identifier "_logger"
. "."
identifier "LogError"
argument_list
( "("
argument
identifier "ex"
, ","
argument
string_literal
" "\""
string_literal_content "Reading the file at {Path} failed due to an IO Exception. Ma"...
" "\""
, ","
argument
member_access_expression
identifier "fileInfo"
. "."
identifier "FullName"
) ")"
; ";"
expression_statement all 2:1
assignment_expression all 2:1
member_access_expression all 2:1
identifier "result" all 2:1
. "." all 2:1
identifier "Exists" all 2:1
= "=" all 2:1
boolean_literal all 2:1
false "false" all 2:1
; ";" all 2:1
} "}"
} "}"
} "}"
expression_statement
assignment_expression
member_access_expression
identifier "result"
. "."
identifier "CreationTimeUtc"
= "="
invocation_expression
identifier "GetCreationTimeUtc"
argument_list
( "("
argument
identifier "info"
) ")"
; ";"
expression_statement
assignment_expression
member_access_expression
identifier "result"
. "."
identifier "LastWriteTimeUtc"
= "="
invocation_expression
identifier "GetLastWriteTimeUtc"
argument_list
( "("
argument
identifier "info"
) ")"
; ";"
} "}"
else "else"
block
{ "{"
expression_statement
assignment_expression
member_access_expression
identifier "result"
. "."
identifier "IsDirectory"
= "="
is_pattern_expression
identifier "info"
is "is"
constant_pattern
identifier "DirectoryInfo"
; ";"
} "}"
return_statement
return "return"
identifier "result"
; ";"
} "}"
comment "/// <summary>"
comment "/// Takes a filename and removes invalid characters."
comment "/// </summary>"
comment "/// <param name=\"filename\">The filename.</param>"
comment "/// <returns>System.String.</returns>"
comment "/// <exception cref=\"ArgumentNullException\">The filename is "...
method_declaration (+220 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the creation time UTC."
comment "/// </summary>"
comment "/// <param name=\"info\">The info.</param>"
comment "/// <returns>DateTime.</returns>"
method_declaration (+68 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+32 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+23 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+23 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the creation time UTC."
comment "/// </summary>"
comment "/// <param name=\"info\">The info.</param>"
comment "/// <returns>DateTime.</returns>"
method_declaration (+68 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+32 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+153 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+223 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+186 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+86 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+65 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+50 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+75 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+45 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+135 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+66 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+47 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+55 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+65 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+301 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+87 nodes collapsed)
method_declaration (+37 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+56 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+48 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+256 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+125 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+29 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+29 nodes collapsed)
method_declaration (+39 nodes collapsed)
} "}"
} "}"

After

compilation_unit
using_directive
using "using"
identifier "System"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "System"
. "."
identifier "Collections"
. "."
identifier "Generic"
; ";"
using_directive
using "using"
qualified_name
identifier "System"
. "."
identifier "Globalization"
; ";"
using_directive
using "using"
qualified_name
identifier "System"
. "."
identifier "IO"
; ";"
using_directive
using "using"
qualified_name
identifier "System"
. "."
identifier "Linq"
; ";"
using_directive
using "using"
qualified_name
identifier "System"
. "."
identifier "Security"
; ";"
using_directive
using "using"
qualified_name
identifier "Jellyfin"
. "."
identifier "Extensions"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "MediaBrowser"
. "."
identifier "Common"
. "."
identifier "Configuration"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "MediaBrowser"
. "."
identifier "Model"
. "."
identifier "IO"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "Microsoft"
. "."
identifier "Extensions"
. "."
identifier "Logging"
; ";"
namespace_declaration
namespace "namespace"
qualified_name
qualified_name
qualified_name
identifier "Emby"
. "."
identifier "Server"
. "."
identifier "Implementations"
. "."
identifier "IO"
declaration_list
{ "{"
comment "/// <summary>"
comment "/// Class ManagedFileSystem."
comment "/// </summary>"
class_declaration
modifier
public "public"
class "class"
identifier "ManagedFileSystem"
base_list
: ":"
identifier "IFileSystem"
declaration_list
{ "{"
field_declaration (+21 nodes collapsed)
field_declaration (+255 nodes collapsed)
field_declaration
modifier
private "private"
modifier
readonly "readonly"
variable_declaration
generic_name
identifier "ILogger"
type_argument_list
< "<"
identifier "ManagedFileSystem"
> ">"
variable_declarator
identifier "_logger"
; ";"
field_declaration
modifier
private "private"
modifier
readonly "readonly"
variable_declaration
generic_name
identifier "List"
type_argument_list
< "<"
identifier "IShortcutHandler"
> ">"
variable_declarator
identifier "_shortcutHandlers"
; ";"
field_declaration
modifier
private "private"
modifier
readonly "readonly"
variable_declaration
predefined_type "string"
variable_declarator
identifier "_tempPath"
; ";"
comment "/// <summary>"
comment "/// Initializes a new instance of the <see cref=\"ManagedFile"...
comment "/// </summary>"
comment "/// <param name=\"logger\">The <see cref=\"ILogger\"/> instance "...
comment "/// <param name=\"applicationPaths\">The <see cref=\"IApplicati"...
comment "/// <param name=\"shortcutHandlers\">the <see cref=\"IShortcutH"...
constructor_declaration (+59 nodes collapsed)
comment "/// <summary>"
comment "/// Determines whether the specified filename is shortcut."
comment "/// </summary>"
comment "/// <param name=\"filename\">The filename.</param>"
comment "/// <returns><c>true</c> if the specified filename is shortc"...
comment "/// <exception cref=\"ArgumentNullException\"><paramref name=\""...
method_declaration (+83 nodes collapsed)
comment "/// <summary>"
comment "/// Resolves the shortcut."
comment "/// </summary>"
comment "/// <param name=\"filename\">The filename.</param>"
comment "/// <returns>System.String.</returns>"
comment "/// <exception cref=\"ArgumentNullException\"><paramref name=\""...
method_declaration (+105 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+252 nodes collapsed)
comment "/// <summary>"
comment "/// Creates the shortcut."
comment "/// </summary>"
comment "/// <param name=\"shortcutPath\">The shortcut path.</param>"
comment "/// <param name=\"target\">The target.</param>"
comment "/// <exception cref=\"ArgumentNullException\">The shortcutPath"...
method_declaration (+146 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+173 nodes collapsed)
comment "/// <summary>"
comment "/// Returns a <see cref=\"FileSystemMetadata\"/> object for th"...
comment "/// </summary>"
comment "/// <param name=\"path\">A path to a file or directory.</param"...
comment "/// <returns>A <see cref=\"FileSystemMetadata\"/> object.</ret"...
comment "/// <remarks>If the specified path points to a directory, th"...
comment "/// <see cref=\"FileSystemMetadata.IsDirectory\"/> property wi"...
method_declaration (+146 nodes collapsed)
comment "/// <summary>"
comment "/// Returns a <see cref=\"FileSystemMetadata\"/> object for th"...
comment "/// </summary>"
comment "/// <param name=\"path\">A path to a file.</param>"
comment "/// <returns>A <see cref=\"FileSystemMetadata\"/> object.</ret"...
comment "/// <remarks><para>If the specified path points to a directo"...
comment "/// <see cref=\"FileSystemMetadata.IsDirectory\"/> property an"...
comment "/// <para>For automatic handling of files <b>and</b> directo"...
method_declaration (+42 nodes collapsed)
comment "/// <summary>"
comment "/// Returns a <see cref=\"FileSystemMetadata\"/> object for th"...
comment "/// </summary>"
comment "/// <param name=\"path\">A path to a directory.</param>"
comment "/// <returns>A <see cref=\"FileSystemMetadata\"/> object.</ret"...
comment "/// <remarks><para>If the specified path points to a file, t"...
comment "/// <see cref=\"FileSystemMetadata.IsDirectory\"/> property wi"...
comment "/// <para>For automatic handling of files <b>and</b> directo"...
method_declaration (+42 nodes collapsed)
method_declaration
modifier
private "private"
identifier "FileSystemMetadata"
identifier "GetFileSystemMetadata"
parameter_list
( "("
parameter
identifier "FileSystemInfo"
identifier "info"
) ")"
block
{ "{"
local_declaration_statement (+45 nodes collapsed)
if_statement
if "if"
( "("
member_access_expression
identifier "result"
. "."
identifier "Exists"
) ")"
block
{ "{"
expression_statement (+34 nodes collapsed)
if_statement
if "if"
( "("
is_pattern_expression
identifier "info"
is "is"
declaration_pattern
identifier "FileInfo"
identifier "fileInfo"
) ")"
block
{ "{"
expression_statement
assignment_expression
member_access_expression
identifier "result"
. "."
identifier "CreationTimeUtc"
= "="
invocation_expression
identifier "GetCreationTimeUtc"
argument_list
( "("
argument
identifier "info"
) ")"
; ";"
expression_statement
assignment_expression
member_access_expression
identifier "result"
. "."
identifier "LastWriteTimeUtc"
= "="
invocation_expression
identifier "GetLastWriteTimeUtc"
argument_list
( "("
argument
identifier "info"
) ")"
; ";"
if_statement
if "if"
( "("
is_pattern_expression
member_access_expression
identifier "fileInfo"
. "."
identifier "LinkTarget"
is "is"
negated_pattern
not "not"
constant_pattern
null_literal "null"
) ")"
block
{ "{"
try_statement
try "try"
block
{ "{"
local_declaration_statement
variable_declaration
implicit_type
var "var"
variable_declarator
identifier "targetFileInfo"
= "="
cast_expression
( "("
nullable_type
identifier "FileInfo"
? "?"
) ")"
invocation_expression
member_access_expression
identifier "fileInfo"
. "."
identifier "ResolveLinkTarget"
argument_list
( "("
argument
identifier "returnFinalTarget"
: ":"
boolean_literal
true "true"
) ")"
; ";"
if_statement
if "if"
( "("
is_pattern_expression
identifier "targetFileInfo"
is "is"
negated_pattern
not "not"
constant_pattern
null_literal "null"
) ")"
block
{ "{"
expression_statement
assignment_expression
member_access_expression
identifier "result"
. "."
identifier "Exists"
= "="
member_access_expression
identifier "targetFileInfo"
. "."
identifier "Exists"
; ";"
if_statement
if "if"
( "("
member_access_expression
identifier "result"
. "."
identifier "Exists"
) ")"
block
{ "{"
expression_statement
assignment_expression
member_access_expression
identifier "result"
. "."
identifier "Length"
= "="
member_access_expression
identifier "targetFileInfo"
. "."
identifier "Length"
; ";"
expression_statement
assignment_expression
member_access_expression
identifier "result"
. "."
identifier "CreationTimeUtc"
= "="
invocation_expression
identifier "GetCreationTimeUtc"
argument_list
( "("
argument
identifier "targetFileInfo"
) ")"
; ";"
expression_statement
assignment_expression
member_access_expression
identifier "result"
. "."
identifier "LastWriteTimeUtc"
= "="
invocation_expression
identifier "GetLastWriteTimeUtc"
argument_list
( "("
argument
identifier "targetFileInfo"
) ")"
; ";"
} "}"
} "}"
else "else"
block
{ "{"
expression_statement all 2:1
assignment_expression all 2:1
member_access_expression all 2:1
identifier "result" all 2:1
. "." all 2:1
identifier "Exists" all 2:1
= "=" all 2:1
boolean_literal all 2:1
false "false" all 2:1
; ";" all 2:1
} "}"
} "}"
catch_clause (+34 nodes collapsed)
} "}"
else "else"
block
{ "{"
expression_statement
assignment_expression
member_access_expression
identifier "result"
. "."
identifier "Length"
= "="
member_access_expression
identifier "fileInfo"
. "."
identifier "Length"
; ";"
} "}"
} "}"
} "}"
else "else"
block
{ "{"
expression_statement
assignment_expression
member_access_expression
identifier "result"
. "."
identifier "IsDirectory"
= "="
is_pattern_expression
identifier "info"
is "is"
constant_pattern
identifier "DirectoryInfo"
; ";"
} "}"
return_statement
return "return"
identifier "result"
; ";"
} "}"
comment "/// <summary>"
comment "/// Takes a filename and removes invalid characters."
comment "/// </summary>"
comment "/// <param name=\"filename\">The filename.</param>"
comment "/// <returns>System.String.</returns>"
comment "/// <exception cref=\"ArgumentNullException\">The filename is "...
method_declaration (+220 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the creation time UTC."
comment "/// </summary>"
comment "/// <param name=\"info\">The info.</param>"
comment "/// <returns>DateTime.</returns>"
method_declaration (+68 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+32 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+23 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+23 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the creation time UTC."
comment "/// </summary>"
comment "/// <param name=\"info\">The info.</param>"
comment "/// <returns>DateTime.</returns>"
method_declaration (+68 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+32 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+153 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+223 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+186 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+86 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+65 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+50 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+75 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+45 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+135 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+66 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+47 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+55 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+65 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+301 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+87 nodes collapsed)
method_declaration (+37 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+56 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+48 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+256 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+125 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+29 nodes collapsed)
comment "/// <inheritdoc />"
method_declaration (+29 nodes collapsed)
method_declaration (+39 nodes collapsed)
} "}"
} "}"