func (fs *Goofys) StatFS( ctx context.Context, op *fuseops.StatFSOp) (err error) { const BLOCK_SIZE = 4096 const TOTAL_SPACE = 1 * 1024 * 1024 * 1024 * 1024 * 1024 // 1PB const TOTAL_BLOCKS = TOTAL_SPACE / BLOCK_SIZE const INODES = 1 * 1000 * 1000 * 1000 // 1 billion op.BlockSize = BLOCK_SIZE op.Blocks = TOTAL_BLOCKS op.BlocksFree = TOTAL_BLOCKS op.BlocksAvailable = TOTAL_BLOCKS op.IoSize = 1 * 1024 * 1024 // 1MB op.Inodes = INODES op.InodesFree = INODES return }
func (fs *fileSystem) StatFS( ctx context.Context, op *fuseops.StatFSOp) (err error) { // Simulate a large amount of free space so that the Finder doesn't refuse to // copy in files. (See issue #125.) Use 2^17 as the block size because that // is the largest that OS X will pass on. op.BlockSize = 1 << 17 op.Blocks = 1 << 33 op.BlocksFree = op.Blocks op.BlocksAvailable = op.Blocks // Similarly with inodes. op.Inodes = 1 << 50 op.InodesFree = op.Inodes // Prefer large transfers. This is the largest value that OS X will // faithfully pass on, according to fuseops/ops.go. op.IoSize = 1 << 20 return }