Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
FileSystemEventArgs.cs
Go to the documentation of this file.
1namespace System.IO;
2
4{
6
7 private readonly string _name;
8
9 private readonly string _fullPath;
10
12
13 public string FullPath => _fullPath;
14
15 public string? Name => _name;
16
17 public FileSystemEventArgs(WatcherChangeTypes changeType, string directory, string? name)
18 {
19 _changeType = changeType;
20 _name = name;
21 _fullPath = Combine(directory, name);
22 }
23
24 internal static string Combine(string directoryPath, string name)
25 {
26 bool flag = false;
27 if (directoryPath.Length > 0)
28 {
29 char c = directoryPath[directoryPath.Length - 1];
30 flag = c == Path.DirectorySeparatorChar || c == Path.AltDirectorySeparatorChar;
31 }
32 if (!flag)
33 {
34 return directoryPath + Path.DirectorySeparatorChar + name;
35 }
36 return directoryPath + name;
37 }
38}
readonly WatcherChangeTypes _changeType
static string Combine(string directoryPath, string name)
FileSystemEventArgs(WatcherChangeTypes changeType, string directory, string? name)
static readonly char AltDirectorySeparatorChar
Definition Path.cs:73