SetCurrentDirectory() public abstract méthode

public abstract SetCurrentDirectory ( string fullPath ) : void
fullPath string
Résultat void
Exemple #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);
 }
Exemple #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);
        }