alphaleonis / AlphaFS

AlphaFS is a .NET library providing more complete Win32 file system functionality to the .NET platform than the standard System.IO classes.
http://alphafs.alphaleonis.com/
MIT License
562 stars 99 forks source link

Modify method Directory.CreateDirectoryCore to return null as well as DirectoryInfo instance. #459

Closed Yomodo closed 6 years ago

Yomodo commented 6 years ago

Internally, the returned DirectoryInfo instance from Directory.CreateDirectory is not always needed. Creating the instance takes some cycles that can be prevented so methods calling Directory.CreateDirectory will benefit from this, like Directory.Copy.

Add argument bool returnNull to method Directory.CreateDirectoryCore to accomplish this.