touch eğer dosya varsa erişim tarihini güncellesin, yoksa yaratsın..
This commit is contained in:
@@ -66,8 +66,13 @@ def copytree(source, destination, sym=False):
|
|||||||
shutil.copytree(source, destination, sym)
|
shutil.copytree(source, destination, sym)
|
||||||
|
|
||||||
def touch(sourceFile):
|
def touch(sourceFile):
|
||||||
for file in glob.glob(sourceFile):
|
'''changes the access time of the 'sourceFile', or creates it if it is not exist'''
|
||||||
os.utime(file, None)
|
if glob.glob(sourceFile):
|
||||||
|
for file in glob.glob(sourceFile):
|
||||||
|
os.utime(file, None)
|
||||||
|
else:
|
||||||
|
f = open(sourceFile, 'w')
|
||||||
|
f.close()
|
||||||
|
|
||||||
def cd(directoryName = ''):
|
def cd(directoryName = ''):
|
||||||
'''change directory'''
|
'''change directory'''
|
||||||
|
|||||||
Reference in New Issue
Block a user