Bloom.WebLibraryIntegration.BloomS3Client.DeleteFileSystemInfo C# (CSharp) Method

DeleteFileSystemInfo() private static method

private static DeleteFileSystemInfo ( FileSystemInfo fileSystemInfo ) : void
fileSystemInfo System.IO.FileSystemInfo
return void
        private static void DeleteFileSystemInfo(FileSystemInfo fileSystemInfo)
        {
            var directoryInfo = fileSystemInfo as DirectoryInfo;
            if (directoryInfo != null)
            {
                foreach (var childInfo in directoryInfo.GetFileSystemInfos())
                {
                    DeleteFileSystemInfo(childInfo);
                }
            }

            fileSystemInfo.Attributes = FileAttributes.Normal; // thumbnails can be intentionally readonly (when they are created by hand)
            fileSystemInfo.Delete();
        }