/// <summary> /// Converts a FileInfo array into an IFileInfo array. /// </summary> /// <param name="fileInfos"> /// The FileInfo array to convert. /// </param> /// <returns> /// The IFileInfo array. /// </returns> internal static IFileInfo[] ConvertFileInfoToIFileInfoArray(FileInfo[] fileInfos) { var array = new IFileInfo[fileInfos.Length]; for (var i = 0; i < array.Length; i++) { array[i] = new FileInfoWrap(fileInfos[i]); } return(array); }
/// <summary> /// Converts a FileInfo array into an IFileInfo array. /// </summary> /// <param name="fileInfos"> /// The FileInfo array to convert. /// </param> /// <returns> /// The IFileInfo array. /// </returns> internal static IFileInfo[] ConvertFileInfoToIFileInfoArray(FileInfo[] fileInfos) { var array = new IFileInfo[fileInfos.Length]; for (int i = 0; i < array.Length; i++) { array[i] = new FileInfoWrap(fileInfos[i]); } return array; }
/// <summary> /// Gets the files of this directory. /// </summary> /// <returns>The collection of files.</returns> public IFileInfo[] GetFiles() { return(FileInfoWrap.ConvertFileInfoToIFileInfoArray(directoryInfo.GetFiles())); }