Blog.Common.Utils.Helpers.FileHelper.DeleteDirectory C# (CSharp) Méthode

DeleteDirectory() public méthode

public DeleteDirectory ( string path ) : bool
path string
Résultat bool
        public bool DeleteDirectory(string path)
        {
            try
            {
                var dirInfo = new DirectoryInfo(path);
                dirInfo.Delete(true);

                return true;
            }
            catch (Exception ex)
            {
                throw new BlogException(ex.Message, ex.InnerException);
            }
        }