A wrapper for the DirectoryInfo class.
Inheritance: IDirectoryInfo
        /// <summary>
        ///     Converts an array of DirectoryInfo into an array of IDirectoryInfo.
        /// </summary>
        /// <param name="directoryInfos">
        ///     The DirectoryInfo objects to convert.
        /// </param>
        /// <returns>
        ///     The array of IDirectoryInfo.
        /// </returns>
        private static IDirectoryInfo[] ConvertDirectoryInfoToIDirectoryInfo(DirectoryInfo[] directoryInfos)
        {
            var array = new IDirectoryInfo[directoryInfos.Length];

            for (var i = 0; i < array.Length; i++)
            {
                array[i] = new DirectoryInfoWrap(directoryInfos[i]);
            }

            return(array);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Converts an array of DirectoryInfo into an array of IDirectoryInfo.
        /// </summary>
        /// <param name="directoryInfos">
        /// The DirectoryInfo objects to convert.
        /// </param>
        /// <returns>
        /// The array of IDirectoryInfo.
        /// </returns>
        private static IDirectoryInfo[] ConvertDirectoryInfoToIDirectoryInfo(DirectoryInfo[] directoryInfos)
        {
            var array = new IDirectoryInfo[directoryInfos.Length];
            for (int i = 0; i < array.Length; i++)
            {
                array[i] = new DirectoryInfoWrap(directoryInfos[i]);
            }

            return array;
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Refresh the specified sub directory.
 /// </summary>
 /// <param name="subDirectory">
 /// The sub directory to refresh. 
 /// </param>
 /// <returns>
 /// The list of files identified during the refresh operation. 
 /// </returns>
 public List<FileResult> Refresh(string subDirectory)
 {
     var root = new DirectoryInfoWrap(string.Concat(this.settings.SourceDirectory, subDirectory));
     return this.Refresh(root);
 }