MCPcopy Create free account
hub / github.com/PyImageSearch/imutils / TempFile

Class TempFile

imutils/io/tempfile.py:5–13  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3import os
4
5class TempFile:
6 def __init__(self, basePath="./", ext=".jpg"):
7 # construct the file path
8 self.path = "{base_path}/{rand}{ext}".format(base_path=basePath, rand=str(uuid.uuid4()),
9 ext=ext)
10
11 def cleanup(self):
12 # remove the file
13 os.remove(self.path)

Callers 1

temp_file.pyFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…