SetCurrentDirectory() public abstract method

public abstract SetCurrentDirectory ( string fullPath ) : void
fullPath string
return void
Ejemplo n.º 1
0
 public override void SetCurrentDirectory(string fullPath)
 {
     // WinRT honors the Win32 current directory, but does not expose it,
     // so we use the Win32 implementation always.
     // This will throw UnauthorizedAccess on brokered paths.
     _win32FileSystem.SetCurrentDirectory(fullPath);
 }
Ejemplo n.º 2
0
        public static void SetCurrentDirectory(string path)
        {
            if (path == null)
            {
                throw new ArgumentNullException(nameof(path));
            }
            if (path.Length == 0)
            {
                throw new ArgumentException(SR.Argument_PathEmpty, nameof(path));
            }

            string fulldestDirName = Path.GetFullPath(path);

            FileSystem.SetCurrentDirectory(fulldestDirName);
        }