add chunk file helper to support large file

This commit is contained in:
tnextday
2015-11-29 23:49:41 +08:00
parent a4f64c0116
commit 1817864a45
4 changed files with 137 additions and 1 deletions

View File

@@ -16,6 +16,7 @@ const (
FlagHasMime = 0x04
FlagHasLastModifiedDate = 0x08
FlagHasTtl = 0x10
FlagChunkList = 0x80
LastModifiedBytesLength = 5
TtlBytesLength = 2
)
@@ -280,3 +281,11 @@ func (n *Needle) HasTtl() bool {
func (n *Needle) SetHasTtl() {
n.Flags = n.Flags | FlagHasTtl
}
func (n *Needle) IsChunkList() bool {
return n.Flags&FlagChunkList > 0
}
func (n *Needle) SetChunkList() {
n.Flags = n.Flags | FlagChunkList
}