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
archive/tar: provide FileInfo method on Header #4695
Labels
Milestone
Comments
Except for some logic around the Mode, should be as simple as (although untested): func (h *Header) FileInfo() os.FileInfo { return headerFileInfo{h} } type tarHeaderFileInfo struct { th *Header } func (fi tarHeaderFileInfo) Size() int64 { return fi.th.Size } func (fi tarHeaderFileInfo) IsDir() bool { return fi.th.Mode == tar.TypeDir } func (fi tarHeaderFileInfo) ModTime() time.Time { return fi.th.ModTime } func (fi tarHeaderFileInfo) Mode() os.FileMode { return os.ModePerm } // Not sure what this should be func (fi tarHeaderFileInfo) Sys() interface{} { return fi.th } |
Work has been done in the following CL: https://golang.org/cl/7305072/ |
Owner changed to @adg. Status changed to Started. |
This issue was closed by revision 44d38ae. Status changed to Fixed. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: