MCPcopy Create free account
hub / github.com/aws/aws-cli / allocate

Method allocate

awscli/s3transfer/utils.py:331–337  ·  view source on GitHub ↗
(self, filename, size)

Source from the content-addressed store, hash-verified

329 return os.path.join(path, temp_filename)
330
331 def allocate(self, filename, size):
332 try:
333 with self.open(filename, 'wb') as f:
334 fallocate(f, size)
335 except OSError:
336 self.remove_file(filename)
337 raise
338
339
340class DeferredOpenFile:

Callers 3

test_allocateMethod · 0.80

Calls 3

openMethod · 0.95
remove_fileMethod · 0.95
fallocateFunction · 0.90

Tested by 3

test_allocateMethod · 0.64