Whitelog.Core.File.FileStreamProvider.CreateFile C# (CSharp) Method

CreateFile() private method

private CreateFile ( string filePath ) : FileStream
filePath string
return System.IO.FileStream
        private FileStream CreateFile(string filePath)
        {
            if (!System.IO.Directory.Exists(System.IO.Path.GetDirectoryName(System.IO.Path.GetFullPath(filePath))))
            {
                System.IO.Directory.CreateDirectory(System.IO.Path.GetDirectoryName(System.IO.Path.GetFullPath(filePath)));
            }
            // http://support.microsoft.com/?kbid=172190
            // http://stackoverflow.com/questions/2109152/unbelievable-strange-file-creation-time-problem
            // there is a bug with the creation time, to overcome this problem we need to change the file creation time manualy
            FileName = filePath;
            using (var strem = System.IO.File.Open(filePath, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.Read))
            {

            }
            new FileInfo(FileName).CreationTime = DateTime.Now;
            return System.IO.File.Open(filePath, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.Read);
        }