test/Shared/FunctionalTests.Transitional/TestHelpers/IOHelpers.cs
/// <summary>
/// Creates the specified directory if it doesn't exist.
/// </summary>
/// <param name="path"> Path to directory to create. </param>
Creates the specified directory if it doesn't exist.
Creates the specified directory if it doesn ' t exist .
[SecuritySafeCritical]
        [PermissionSet(SecurityAction.Assert, Unrestricted = true)]
        public static void EnsureDirectoryExists(string path)
        {
            if (!Directory.Exists(path))
            {
                Directory.CreateDirectory(path);
            }
        }
[ SecuritySafeCritical ] [ PermissionSet ( SecurityAction . Assert , Unrestricted = true ) ] public static void EnsureDirectoryExists ( string path ) { if ( ! Directory . Exists ( path ) ) { Directory . CreateDirectory ( path ) ; } }
Creates the specified directory if it doesn't exist.
Creates the specified directory if it doesn ' t exist .
// Calling Directory.Exists and Directory.CreateDirectory demands FileIOPermission (Read | Write) for the specified path.
path
string
Path to directory to create.
Path to directory to create .