test/Shared/FunctionalTests.Transitional/TestHelpers/IOHelpers.cs
/// <summary>
/// Safely determines whether the given path refers to an existing directory on disk.
/// </summary>
/// <param name="path"> The path to test. </param>
/// <returns> True if path refers to an existing directory; otherwise, false. </returns>
Safely determines whether the given path refers to an existing directory on disk.
Safely determines whether the given path refers to an existing directory on disk .
[SecuritySafeCritical]
        [PermissionSet(SecurityAction.Assert, Unrestricted = true)]
        public static bool DirectoryExists(string path)
        {
            return Directory.Exists(path);
        }
[ SecuritySafeCritical ] [ PermissionSet ( SecurityAction . Assert , Unrestricted = true ) ] public static bool DirectoryExists ( string path ) { return Directory . Exists ( path ) ; }
Safely determines whether the given path refers to an existing directory on disk.
Safely determines whether the given path refers to an existing directory on disk .
// Calling Directory.Exists demands FileIOPermission (Read flag) for the specified path.
True if path refers to an existing directory; otherwise, false.
True if path refers to an existing directory ; otherwise false .
path
string
The path to test.
The path to test .