Access to nautilus compression tool

I am currently trying to make some edits on an extension, for which I would like to take use of nautilus’s compression option if possible.

Is there any API list that developers can use to have access to nautilus’s compression tool?

Thanks.

Vermli

I am not sure what you mean by access to the nautilus compression tool. Nautilus uses gnome-autoar project to implement compression, see https://gitlab.gnome.org/GNOME/gnome-autoar.

What I am working on is trying to access the compress tool in nautilus. I would like to select a random file by inputing its path and open up the dialog box of nautilus’ compression tool to choose compression option.

Is it possible to do this? I wonder if this can be done by scripting, or I would need to write something and pass the path to nautilus’ API.

Maybe over the extensions API somehow, @antoniof would know that. But it would be a nice addition to the Nautilus dbus interface: https://gitlab.gnome.org/GNOME/nautilus/-/blob/master/data/dbus-interfaces2.xml

Adding a D-Bus API is possible and I’m willing to do it if there is a compelling use case.

However, please note that the org.gnome.Nautilus.FileOperations2 D-Bus API is just that: an implementation of file operations. It’s not a UI toolkit. It doesn’t provide UI to prepare those file operations.

Example: there is a CreateFolder() method. But it doesn’t invoke the dialog Files uses to create a folder. The API consumers must implement the UI themselves. The method handles the actual creation operation only.

So, we could expose a “CompressURIs()” function just fine. But not one that invokes the Compress dialog used by Files.

This is because the D-Bus API shouldn’t make assumptions about UI. Sure, we use nowadays use a dialog, but this design could change in the future (it might become a popover, or a sidebar, or something else, it doesn’t matter). I don’t want our app’s UI design freedom to be limited by this potential API.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.