Example #1
0
        /// <summary>
        /// Attempt to extract a file as an archive
        /// </summary>
        /// <param name="outDir">Output directory for archive extraction</param>
        /// <returns>True if the extraction was a success, false otherwise</returns>
        public virtual bool CopyAll(string outDir)
        {
            // Copy all files from the current folder to the output directory recursively
            try
            {
                // Make sure the folders exist
                Directory.CreateDirectory(_filename);
                Directory.CreateDirectory(outDir);

                Directory.Copy(_filename, outDir, true, PathFormat.FullPath);
            }
            catch (Exception ex)
            {
                Globals.Logger.Error(ex.ToString());
                return(false);
            }

            return(true);
        }