[Development] New API design for file system operations

Jason H jhihn at gmx.com
Tue Feb 12 13:39:50 CET 2019


> Sent: Tuesday, February 12, 2019 at 9:54 AM
> From: "Volker Hilsheimer" <volker.hilsheimer at qt.io>
> To: "Jason H" <jhihn at gmx.com>
> Cc: "Vitaly Fanaskov" <vitaly.fanaskov at qt.io>, "development at qt-project.org" <development at qt-project.org>
> Subject: Re: [Development] New API design for file system operations
>
> 
> 
> > On 11 Feb 2019, at 19:16, Jason H <jhihn at gmx.com> wrote:
> > 
> > 
> >> The question for me is: why would an application (that is not a file explorer) want to do any of this? I honestly don’t see the use case.
> > 
> > When I filed the bug against KIO not having a "trash" feature it was because I was working in digikam (photo library) in KDE - this is MANY years ago (2004,  https://bugs.kde.org/show_bug.cgi?id=88615 ). Anyway, I deleted the library in the application, and ALL my photos went *poof*. I looked in the trash... Nothing. I expected my user-generated data to to be recoverable in the trash. 
> > 
> > So the use case, is when the user has generated data that the application does not own, where it should not assume ownership of said data and the user has requested it be removed. 
> > OR 
> > The user has requested the data be removed but not destroyed, so in a way that the data can be potentially recovered. 
> 
> But that’s a usecase for a “move-stuff-to-the-trash” function, right? As in “remove those files, but do not delete them permanently”.
> 
> The user would expect to be able to see what’s in the trash, and to restore stuff from there, using the standard desktop trash-can metaphore, not some application specific shenanigans.
> 
> You would want the application perhaps to be aware of the user restoring data from the trash, ie adding the files back into the workspace, or the photos back into the library. In that sense, "restoring from trash" is just the same as “restoring from backup” or “downloading from the internet”, I suppose.


If there is a restore function, I would only expect it to exist as an "undo" operation. Like if a cat walked on the keyboard pressing the delete key. Although it probably doesn't really matter to Qt. The move to trash and undo pair of operations should both be supported.



More information about the Development mailing list