mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 20:59:27 +01:00
Added a touch function to the file utils module.
This commit is contained in:
parent
c8d114b9bc
commit
29fc5681d3
@ -47,6 +47,10 @@ def readLines(filename):
|
||||
return [line.rstrip('\r\n') for line in fd.readlines()]
|
||||
finally:
|
||||
fd.close()
|
||||
|
||||
def touch(filename):
|
||||
fd = file(filename, 'w')
|
||||
fd.close()
|
||||
|
||||
def mktemp(suffix=''):
|
||||
"""Gives a decent random string, suitable for a filename."""
|
||||
|
Loading…
Reference in New Issue
Block a user