SafePathEnsure() public static method

Wrapper around PathEnsure() that doesn't throw exceptions. Returns "" on error and prints an error message to _log
public static SafePathEnsure ( string basepath ) : string
basepath string
return string
        /// <summary>
        /// Uses Ionic.Zip library to expand a file (without overwriting) to a given location
        /// </summary>
        /// <param name="basePath"></param>
        /// <param name="zipFileName"></param>
        /// <returns></returns>
        public static bool UnzipFileTo(string basePath, string zipFileName)
        {
            try
            {
                _log.DebugFormat("Unzipping {0}", Path.GetFileName(zipFileName));
                FileUtilities.SafePathEnsure(basePath);

                var zipFile = new ZipFile(zipFileName);
                zipFile.ExtractAll(basePath, ExtractExistingFileAction.DoNotOverwrite);

                _log.Debug("Unzipping... Done!");

                if (Settings.ShowFilePaths)
                {
                    _log.InfoFormat("Unzipped \"{0}\" to \"{1}\"", Path.GetFileName(zipFileName), basePath);
                }

                return(true);
            }
            catch (Exception ex)
            {
                _log.Error("Error while unzipping file", ex);
            }
            return(false);
        }