5 Replies Latest reply on Sep 18, 2009 4:35 PM by Calvin Nelson

    Destroy through the API?

    Calvin Nelson

      Anybody know of a way to destroy a file through the SWEPDM API or of any commands to interface with the Enterprise recycle bin?

       

      Thanks,
      Calvin

        • Re: Destroy through the API?
          Have you tried File.Delete() ?
            • Re: Destroy through the API?
              Calvin Nelson

              IEdmFile.DeleteFile() only deletes the file from the vault, placing it in the Enterprise Recycle Bin.

              As far as I can tell, there's no way to access files that are already in the Enterprise recycle bin through File.Delete(). It appears there's no instance left in the file system. When you recover a file, it just grabs the latest version from the vault.

              For files not already deleted from the vault, File.Delete() can only access them if the file is checked out, and it only affects the local copy. It doesn't do anything with the vault record. So, it doesn't even appear to do anything, from an end user standopoint. It still shows in the file listing and clicking on it automatically brings down a new local copy based on the latest version in the vault.

               

              Thanks,
              Calvin

            • Re: Destroy through the API?
              Calvin Nelson

              Found it!

              Using the IedmBatchDelete utility, the ComputePermissions method requires a boolean as to whether the file should be deleted or destroyed.

               

              Enjoy!