Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetDirectoryName() [2/2]

static ? string System.IO.Path.GetDirectoryName ( string? path)
inlinestatic

Definition at line 121 of file Path.cs.

122 {
123 if (path == null || PathInternal.IsEffectivelyEmpty(path.AsSpan()))
124 {
125 return null;
126 }
127 int directoryNameOffset = GetDirectoryNameOffset(path.AsSpan());
128 if (directoryNameOffset < 0)
129 {
130 return null;
131 }
132 return PathInternal.NormalizeDirectorySeparators(path.Substring(0, directoryNameOffset));
133 }
static int GetDirectoryNameOffset(ReadOnlySpan< char > path)
Definition Path.cs:149

References System.IO.Path.GetDirectoryNameOffset(), System.IO.PathInternal.IsEffectivelyEmpty(), and System.IO.PathInternal.NormalizeDirectorySeparators().

Referenced by System.Runtime.Loader.AssemblyDependencyResolver.AssemblyDependencyResolver(), System.Diagnostics.TextWriterTraceListener.EnsureWriter(), System.IO.Compression.ZipFileExtensions.ExtractRelativeToDirectory(), System.AppContext.GetBaseDirectoryCore(), System.IO.IsolatedStorage.IsolatedStorageFile.GetDirectoryNames(), System.IO.FileSystem.GetImmediateLinkTarget(), System.ComponentModel.LicFileLicenseProvider.GetLicense(), System.IO.PathInternal.GetLinkTargetFullPath(), System.IO.Directory.GetParent(), System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory(), System.Xml.Serialization.TempAssembly.LoadAssemblyByPath(), System.Reflection.Assembly.LoadFromResolveHandler(), System.IO.FileInfo.MoveTo(), System.IO.Enumeration.FileSystemEnumerableFactory.NormalizeInputs(), System.IO.IsolatedStorage.IsolatedStorageFile.Remove(), System.Runtime.Loader.AssemblyLoadContext.ResolveSatelliteAssembly(), System.Data.XmlTreeGen.SetPath(), and System.Reflection.PortableExecutable.PEReader.TryOpenAssociatedPortablePdb().