Android Question Find Date File Was Created

Yvon Steinthal

Active Member
Licensed User
Longtime User
Hi,

Easy enough, my application is downloading images of profile pictures from a database. Those pictures are saved in internal or external, it doesnt really matter (but i'd rather put them in internal so only the app can have access to them...)

In the end i want to create a test of date on those files so that if any extends the 24h mark, i can delete them.

In other words i just want to create a custom garbage collector that checks the date of files in the folder and deletes any files that were created over 24hrs ago.

Is it possible to retrieve such data as file creation date/time?

Y.


EDIT: I found a solution with File.LastModified but i'd rather have created time/date...
 
Last edited:

cbal03

Member
Licensed User
Longtime User
Hi,

Easy enough, my application is downloading images of profile pictures from a database. Those pictures are saved in internal or external, it doesnt really matter (but i'd rather put them in internal so only the app can have access to them...)

In the end i want to create a test of date on those files so that if any extends the 24h mark, i can delete them.

In other words i just want to create a custom garbage collector that checks the date of files in the folder and deletes any files that were created over 24hrs ago.

Is it possible to retrieve such data as file creation date/time?

Y.


EDIT: I found a solution with File.LastModified but i'd rather have created time/date...
related thread for anyone else looking for an image file timestamp.
 
Upvote 0
Top