Example #1
0
        /// <summary>
        /// Retrieves all file content as a string from a directory
        /// </summary>
        /// <param name="directoryObject">Directory to retrieve content from</param>
        /// <param name="boolRecurse">Flag that determines whether files are retrieved recursively including files from sub-directories</param>
        /// <returns></returns>
        private static string GetFileContentAsString(this DirectoryObject directoryObject, bool boolRecurse)
        {
            string strContent = directoryObject.GetFileContentAsString("*", boolRecurse);

            return(strContent);
        }
Example #2
0
 /// <summary>
 /// Copies directory files to a destination directory
 /// </summary>
 /// <param name="destinationDirectoryObject">Destination for directory files to be copied to</param>
 /// <param name="strFind">Search pattern to use retrieving files</param>
 /// <param name="boolRecurse">Flag that determines whether files are retrieved recursively including files from sub-directories</param>
 /// <param name="boolDeleteOriginal">Flag that determines whether to delete the original files</param>
 /// <returns></returns>
 public Globals.ResultType CopyFiles(DirectoryObject destinationDirectoryObject, string strFind, bool boolRecurse, bool boolDeleteOriginal = false)
 {
     return(this.CopyFiles(destinationDirectoryObject, strFind, boolRecurse, boolDeleteOriginal));
 }
Example #3
0
        /// <summary>
        /// Retrieves all file content as a line list from a directory
        /// </summary>
        /// <param name="directoryObject">Directory to retrieve content from</param>
        /// <param name="boolRecurse">Flag that determines whether files are retrieved recursively including files from sub-directories</param>
        /// <returns></returns>
        private static List <string> GetFileContentAsLineList(this DirectoryObject directoryObject, bool boolRecurse)
        {
            List <string> listLines = directoryObject.GetFileContentAsLineList("*", boolRecurse);

            return(listLines);
        }
Example #4
0
 /// <summary>
 /// Copies a file directory to a destination directory
 /// </summary>
 /// <param name="destinationDirectoryObject">Destination path for directory to be copied to</param>
 /// <returns></returns>
 public Globals.ResultType Copy(DirectoryObject destinationDirectoryObject)
 {
     return(this.Copy(destinationDirectoryObject, this));
 }