[
https://issues.apache.org/jira/browse/COMPRESS-404?focusedWorklogId=436775&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-436775
]
ASF GitHub Bot logged work on COMPRESS-404:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 23/May/20 15:38
Start Date: 23/May/20 15:38
Worklog Time Spent: 10m
Work Description: bodewig commented on a change in pull request #97:
URL: https://github.com/apache/commons-compress/pull/97#discussion_r429556041
##########
File path:
src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveEntry.java
##########
@@ -695,6 +784,15 @@ public void setModTime(final Date time) {
modTime = time.getTime() / MILLIS_PER_SECOND;
}
+ /**
+ * Set this entry's modification time.
+ *
+ * @param time This entry's new modification time.
+ */
+ public void setModTime(final FileTime time) {
Review comment:
please add a since tag
##########
File path:
src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveEntry.java
##########
@@ -724,11 +822,26 @@ public boolean isCheckSumOK() {
* Get this entry's file.
*
* <p>This method is only useful for entries created from a {@code
- * File} but not for entries read from an archive.</p>
+ * File} or {@code Path} but not for entries read from an archive.</p>
*
- * @return This entry's file.
+ * @return This entry's file or null if the entry was not created from a
file.
*/
public File getFile() {
+ if (file == null) {
+ return null;
+ }
+ return file.toFile();
+ }
+
+ /**
+ * Get this entry's file.
+ *
+ * <p>This method is only useful for entries created from a {@code
+ * File} or {@code Path} but not for entries read from an archive.</p>
+ *
+ * @return This entry's file or null if the entry was not created from a
file.
+ */
+ public Path getPath() {
Review comment:
please add a since tag
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 436775)
Time Spent: 3h (was: 2h 50m)
> Add Path equivalents to TarArchiveEntry, with methods using File delegating
> to equivalents
> ------------------------------------------------------------------------------------------
>
> Key: COMPRESS-404
> URL: https://issues.apache.org/jira/browse/COMPRESS-404
> Project: Commons Compress
> Issue Type: Sub-task
> Reporter: Simon Spero
> Priority: Minor
> Time Spent: 3h
> Remaining Estimate: 0h
>
> (This is a reasonable place to start, as Paths give better access to
> tar-relevant metadata on unix system).
> Symlink info is easier to obtain
> Unix based Paths allow access to useful attributes under "unix:*"
> - numeric uid and gid
> - string owner and group names
> - mtime,ctime,atime
> - numeric mode
> - numeric dev and inode
> - numeric rdev
> - Linux, Solaris and Windows allow access to extended attributes
> (MacOS X xattrs aren't supported as of jdk 9)
--
This message was sent by Atlassian Jira
(v8.3.4#803005)