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

Method remove_file

awscli/s3transfer/utils.py:283–290  ·  view source on GitHub ↗

Remove a file, noop if file does not exist.

(self, filename)

Source from the content-addressed store, hash-verified

281 return open(filename, mode)
282
283 def remove_file(self, filename):
284 """Remove a file, noop if file does not exist."""
285 # Unlike os.remove, if the file does not exist,
286 # then this method does nothing.
287 try:
288 os.remove(filename)
289 except OSError:
290 pass
291
292 def rename_file(self, current_filename, new_filename):
293 rename_file(current_filename, new_filename)

Callers 2

allocateMethod · 0.95
__call__Method · 0.45

Calls 1

removeMethod · 0.45

Tested by

no test coverage detected