MCPcopy Index your code
hub / github.com/aws/aws-cli / fallocate

Function fallocate

awscli/s3transfer/compat.py:86–90  ·  view source on GitHub ↗
(fileobj, size)

Source from the content-addressed store, hash-verified

84
85
86def fallocate(fileobj, size):
87 if hasattr(os, 'posix_fallocate'):
88 os.posix_fallocate(fileobj.fileno(), 0, size)
89 else:
90 fileobj.truncate(size)
91
92
93# Import at end of file to avoid circular dependencies

Callers 1

allocateMethod · 0.90

Calls 1

filenoMethod · 0.80

Tested by

no test coverage detected