[DEV] add a complete file reader
This commit is contained in:
parent
b685e8442a
commit
bb6e701bd8
@ -41,6 +41,13 @@ def FileSize(path):
|
|||||||
statinfo = os.stat(path)
|
statinfo = os.stat(path)
|
||||||
return statinfo.st_size
|
return statinfo.st_size
|
||||||
|
|
||||||
|
def FileReadData(path):
|
||||||
|
if not os.path.isfile(path):
|
||||||
|
return ""
|
||||||
|
file = open(path, "r")
|
||||||
|
data_file = file.read()
|
||||||
|
file.close()
|
||||||
|
return data_file
|
||||||
|
|
||||||
def ListToStr(list):
|
def ListToStr(list):
|
||||||
if type(list) == type(str()):
|
if type(list) == type(str()):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user