Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(9)

Delta Between Two Patch Sets: src/pkg/archive/tar/common.go

Issue 6700047: code review 6700047: archive/tar: read/write extended pax/gnu tar archives (Closed)
Left Patch Set: diff -r 439cb8bad388 https://code.google.com/p/go Created 11 years, 1 month ago
Right Patch Set: diff -r 439cb8bad388 https://code.google.com/p/go Created 11 years, 1 month ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | src/pkg/archive/tar/reader.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 // Copyright 2009 The Go Authors. All rights reserved. 1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 // Package tar implements access to tar archives. 5 // Package tar implements access to tar archives.
6 // It aims to cover most of the variations, including those produced 6 // It aims to cover most of the variations, including those produced
7 // by GNU and BSD tars. 7 // by GNU and BSD tars.
8 // 8 //
9 // References: 9 // References:
10 // http://www.freebsd.org/cgi/man.cgi?query=tar&sektion=5 10 // http://www.freebsd.org/cgi/man.cgi?query=tar&sektion=5
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 Typeflag byte // type of header entry 50 Typeflag byte // type of header entry
51 Linkname string // target name of link 51 Linkname string // target name of link
52 Uname string // user name of owner 52 Uname string // user name of owner
53 Gname string // group name of owner 53 Gname string // group name of owner
54 Devmajor int64 // major number of character or block device 54 Devmajor int64 // major number of character or block device
55 Devminor int64 // minor number of character or block device 55 Devminor int64 // minor number of character or block device
56 AccessTime time.Time // access time 56 AccessTime time.Time // access time
57 ChangeTime time.Time // status change time 57 ChangeTime time.Time // status change time
58 } 58 }
59 59
60 // Some standard field sizes 60 // File name constants from the tar spec.
61 const ( 61 const (
62 » FileNameSize = 100 62 » fileNameSize = 100 // Maximum number of bytes in a standard tar na me.
dsymonds 2013/02/07 04:16:27 these don't need to be exported. they could also d
shanemhansen 2013/02/07 04:35:43 Done.
63 » FileNamePrefixSize = 155 63 » fileNamePrefixSize = 155 // Maximum number of ustar extension bytes.
64 ) 64 )
65 65
66 // sysStat, if non-nil, populates h from system-dependent fields of fi. 66 // sysStat, if non-nil, populates h from system-dependent fields of fi.
67 var sysStat func(fi os.FileInfo, h *Header) error 67 var sysStat func(fi os.FileInfo, h *Header) error
68 68
69 // Mode constants from the tar spec. 69 // Mode constants from the tar spec.
70 const ( 70 const (
71 c_ISDIR = 040000 71 c_ISDIR = 040000
72 c_ISFIFO = 010000 72 c_ISFIFO = 010000
73 c_ISREG = 0100000 73 c_ISREG = 0100000
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 return 138 return
139 } 139 }
140 140
141 type slicer []byte 141 type slicer []byte
142 142
143 func (sp *slicer) next(n int) (b []byte) { 143 func (sp *slicer) next(n int) (b []byte) {
144 s := *sp 144 s := *sp
145 b, *sp = s[0:n], s[n:] 145 b, *sp = s[0:n], s[n:]
146 return 146 return
147 } 147 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b