303 {
304 get
305 {
306 Span<char> initialBuffer = stackalloc char[260];
308 uint currentDirectory;
310 {
312 }
313 if (currentDirectory == 0)
314 {
316 }
317 outputBuilder.Length = (int)currentDirectory;
318 if (outputBuilder.
AsSpan().Contains(
'~'))
319 {
321 outputBuilder.Dispose();
322 return result;
323 }
324 return outputBuilder.ToString();
325 }
326 set
327 {
329 {
332 }
333 }
334 }
static bool SetCurrentDirectory(string path)
static uint GetCurrentDirectory(uint nBufferLength, ref char lpBuffer)
static string TryExpandShortFileName(ref ValueStringBuilder outputBuilder, string originalPath)
static Exception GetExceptionForLastWin32Error(string path="")
static Exception GetExceptionForWin32Error(int errorCode, string path="")
static int GetLastPInvokeError()
ref char GetPinnableReference()
void EnsureCapacity(int capacity)
ReadOnlySpan< char > AsSpan(bool terminate)