   public class func destroyFileOrDirectory(atPath path: String) throws {
     try FileManager.default.destroyFileOrDirectory(atPath: path)
   }
-
+  
   internal func destroyFileOrDirectory(atPath path: String) throws {
     guard fileExists(atPath: path) == true else { return }
     try removeItem(atPath: path)
   }
-
+  
 }
 

  public class var cachesDirectory: URL {
    return try! FileManager.default.url(for: .cachesDirectory, in: .userDomainMask, appropriateFor: nil, create: true)
  }

  /// **Mechanica**
  ///
  /// Returns the location of discardable cache files (*Library/Application Support/*).
  /// - Note: Put app-created support files in the *Library/Application support/* directory. In general, this directory includes files that the app uses to run but that should remain hidden from the user. This directory can also include data files, configuration files, templates and modified versions of resources loaded from the app bundle.
  ///
  /// The contents of the *Library/Application Support/* are **backed up by iTunes and iCloud**.
  ///
  /// - Warning: On *macOS* all content in this directory should be placed in a custom subdirectory whose name is that of your app’s bundle identifier or your company.
  ///
  /// - Important: Sandboxed *macOS* apps have all their *Application Support* directory located at a system-defined path (typically found at *~/Library/Containers/<bundle_id>*).
  public class var applicationSupportDirectory: URL {

    let url = try! FileManager.default.url(for: .applicationSupportDirectory, in: .userDomainMask, appropriateFor: nil, create: true)

    #if os(OSX)
      // If the *macOS* app isn't running in a sandbox, a subdirectory based on the *bundle identifier* (or on the app *exectubale file name*) is needed to avoid accidentally sharing files between applications.
      guard (!ProcessInfo.isSandboxed) else { return url }
      return url.appendingPathComponent(App.identifier ?? "", isDirectory: true)
    #else
      return url
    #endif
  }

  /// **Mechanica**
  ///
  /// Returns the location of the temporary directory (*tmp*).

import Foundation

extension FileManager {
  
  // MARK: - URL
  
  /// **Mechanica**
  ///
  /// Returns the location of the document directory (*Documents/*).
