Skip to content

Commit

Permalink
Use the new Entry time methods in Filesystem::File.
Browse files Browse the repository at this point in the history
  • Loading branch information
hainesr committed Apr 23, 2022
1 parent 764aeaf commit 04f3ae5
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions lib/zip/filesystem/file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -167,21 +167,11 @@ def mtime(filename)
end

def atime(filename)
e = find_entry(filename)
if e.extra.member? 'UniversalTime'
e.extra['UniversalTime'].atime
elsif e.extra.member? 'NTFS'
e.extra['NTFS'].atime
end
@mapped_zip.get_entry(filename).atime
end

def ctime(filename)
e = find_entry(filename)
if e.extra.member? 'UniversalTime'
e.extra['UniversalTime'].ctime
elsif e.extra.member? 'NTFS'
e.extra['NTFS'].ctime
end
@mapped_zip.get_entry(filename).ctime
end

def pipe?(_filename)
Expand Down

0 comments on commit 04f3ae5

Please sign in to comment.