- Home /
How to change File modification date without using System.IO
I am writing code in Unity and I want to change file modification date. For that purpouse I am using File.SetLastWriteTime
method. It works fine but on some android versions it simply does not work and gives me an erorr IOException: Invalid parameter
. I googled tha and it seems to be some unresolved bug as number of people reported the same.
My question here is: is there another library or different way I can change last modification date using C#?
I need to preserve original modification date. The file is being downloaded from Amazon S3 but the modification date is set to the exact moment that the file is being saved on the device. This is why after I downloaded it I tried to do File.SetLastWriteTime(file, original_date)
,I am writing code in Unity and I want to change file modification date. For that purpouse I am using File.SetLastWriteTime
method. It works fine but on some android versions it simply does not work and gives me an erorr IOException: Invalid parameter
. I have searched that and it seems to be some unresolved bug as number of people reported the same.
My question here is: is there another library or different way I can change last modification date using C#?
I need to preserve original modification date. The file is being downloaded from Amazon S3 but the modification date is set to the exact moment that the file is being saved on the device. This is why after I downloaded it I tried to do File.SetLastWriteTime(file, original_date)
Your answer
![](https://koobas.hobune.stream/wayback/20220612164227im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
How to diable colliders after scoring point 1 Answer
Problem parsing a file by group of lines 0 Answers
Unity project on android - OnPointerDown/Up movement 1 Answer