Skip to content

Commit

Permalink
add a set time overload which takes a SysTime
Browse files Browse the repository at this point in the history
- This makes setting the time compatible
  with DirEntry time types.
  • Loading branch information
MartinNowak committed Dec 6, 2013
1 parent 463e5d8 commit 136cf72
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion std/zip.d
Expand Up @@ -86,8 +86,8 @@ class ArchiveMember
private ushort _diskNumber;
// should be private when deprecation done
deprecated("Please use fileAttributes instead.") uint externalAttributes;
private DosFileTime _time;

std.datetime.DosFileTime time; /// Read/Write: Last modified time of the member. DOS date/time format.
ushort flags; /// Read/Write: normally set to 0
ushort internalAttributes; /// Read/Write

Expand Down Expand Up @@ -169,6 +169,24 @@ class ArchiveMember
}
}

/// Set the last modification time for this member.
@property void time(SysTime time)
{
_time = SysTimeToDosFileTime(time);
}

/// ditto
@property void time(DosFileTime time)
{
_time = time;
}

/// Get the last modification time for this member.
@property DosFileTime time() const
{
return _time;
}

/**
* Read compression method used for this member
* See_Also:
Expand Down

0 comments on commit 136cf72

Please sign in to comment.