-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extracting files with their default date & time #6
Comments
As it is up to you on "how" you store the unarchived data, it will be also up to you to modify the file time of the created file (the file you just unpacked). |
brl.filesystem offers what you want:
The examples for each archive-format contain this: Local entry:TArchiveEntry = New TArchiveEntry
Local ra:TReadArchive = New TReadArchive
ra.SetFormat(EArchiveFormat.ZIP)
ra.Open("data.zip")
While ra.ReadNextHeader(entry) = ARCHIVE_OK
Print "File : " + entry.Pathname()
Print "Size : " + entry.Size()
Print "Type : " + entry.FileType().ToString()
Local s:String = LoadText(ra.DataStream())
Print "String size : " + s.Length
Print "First n chars : " + s[0..17]
Print
Wend This
dunno if one of these is useful for you. For "modifiedtime" I only saw a setter (for now) |
Seems there is some confusion in the archive.mod-assumptions:
"ctime" is not the creation time - creation time is "birthtime".
|
Once Brucey added the modified-time getter it should be breeze:
|
Thank you so much GWRon for giving time to answer my questions. 🙏 |
Hello Bruce, can you please add more bmx examples in ’archive.mod/zip.mod/examples/’ |
Hello, how can i extract the files with their default time and date from the zip file?
For example, i want to extract the mymovie.mp4 that made in Dec 12, 2019 at 5:15 am from the zip file... how could i do extract the mp4 file without using a write new stream like ra.DataStream()??
The text was updated successfully, but these errors were encountered: