Android Question How to alter last modified date of an external file

Yaron_hadas

New Member
Hi

How to copy file without changing last modified date?
  • so there is no way to alter last modified date of an external file?? or at least copy a file to the external card with all its original attributes?????? How come?
  • I'll appreciate a solution to this relatively simple challenge
 

Erel

B4X founder
Staff member
Licensed User
Longtime User

Note that the file system doesn't always support it.
 
Upvote 0

Yaron_hadas

New Member
Thank you, it worked.
The dealing with the external sd card is cumbersome though and its pity there is no full "easy to use" class (or library) for it
 
Upvote 0

Yaron_hadas

New Member
The external storage class forces the user to pick a file through files interface. One can not just pick it by its path .
There is no routine which converts in a straightforward manner a regular file to an "external file"
There is no direct way to copy a "regular file" from the device (un protected) internal memory to the sdcard with all its original attributes ... and more
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
B4X libraries never make things more complicated than they need to be.
It is the OS that requires these steps when working with external storages: https://developer.android.com/reference/androidx/documentfile/provider/DocumentFile
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…