aashishksahu / SafeSpace

A safe place for your valuable information
GNU General Public License v3.0
186 stars 11 forks source link

[Feature request] Import files with date #98

Open DionKill opened 2 weeks ago

DionKill commented 2 weeks ago

I've noticed that in pretty much every app (this one included) that allows you to encrypt your files, it always imports them without the original date. Screenshot_20241009_125312 Screenshot_20241009_125352

If I have a picture that was took, let's say, in 2021, it'll be imported but shows it's date as the moment it was imported. If I instead were to create a zip with pictures taken in 2021 using a file manager, and then I extract it, the dates stay the same, but it obviously isn't encrypted.

Is there a way to either:

  1. Add files with the original date;
  2. Add files with the date it was imported, but the importing is sorted by date instead of being random, so that the oldest gets imported first and I can still sort by date.

I would love for this to be implemented, also I wish to know why the first one is (again I'm assuming) impossible to do.

atomuspilius commented 2 weeks ago
  1. Добавить файлы с исходной датой;

https://github.com/aashishksahu/SafeSpace/issues/22#issuecomment-1879579039

DionKill commented 2 weeks ago

Yeah I was assuming it was impossible to import the date specifically, but is it possible to import by date so that I can still sort by date?

aashishksahu commented 2 weeks ago

Hi @DionKill Unfortunately it's not possible to get the date of the old file because importing basically means copying. A new copy is created everytime you import.

DionKill commented 2 weeks ago

I see. But is it possible to import the files starting from the oldest one first? So that the new copies are still ordered by date? I mean if I have a picture from 2021 and one from 2022 it imports the one from 2021 first and then the one from 2022.

aashishksahu commented 1 week ago

Well, I tried this but for some reason I couldn't find a way to get the last modified timestamp of the original file. Apparently, both content provider and File apis don't return the timestamp

DionKill commented 1 week ago

Too bad, but thanks a lot for trying. I think for now I'll just import everything and call it a day. Let us know if you find anything, but I'm assuming there's no way if the APIs don't allow you to do that.

EDIT: I've noticed most of the pictures I wanted to import have been taken with a date on the name of the file. Sorting them like that should be doable right?

aashishksahu commented 1 week ago

Yes, you can just sort by name in that case.