diff options
| author | tnextday <fw2k4@163.com> | 2015-11-29 23:49:41 +0800 |
|---|---|---|
| committer | tnextday <fw2k4@163.com> | 2015-11-29 23:49:41 +0800 |
| commit | 1817864a4589e05fa17a27ed1bc954b0cfcf12b4 (patch) | |
| tree | 15d902b8e0f77efc825b6593ffcaa5ad68ad625c /go/storage | |
| parent | a4f64c011620e2ebd5dc41415e6f19713be9897a (diff) | |
| download | seaweedfs-1817864a4589e05fa17a27ed1bc954b0cfcf12b4.tar.xz seaweedfs-1817864a4589e05fa17a27ed1bc954b0cfcf12b4.zip | |
add chunk file helper to support large file
Diffstat (limited to 'go/storage')
| -rw-r--r-- | go/storage/needle_read_write.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/go/storage/needle_read_write.go b/go/storage/needle_read_write.go index eb2d8d459..2a5bd89ea 100644 --- a/go/storage/needle_read_write.go +++ b/go/storage/needle_read_write.go @@ -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 +} |
