echo eklendi...

This commit is contained in:
S.Çağlar Onur
2005-08-28 17:00:14 +00:00
parent f5865e8b1c
commit 62ccb6f958
+11
View File
@@ -37,6 +37,17 @@ def makedirs(destinationDirectory):
except OSError:
pass
def echo(destionationFile, content):
if can_access_file(destionationFile):
try:
f = open(destionationFile, 'a')
f.write("%s\n" % content)
f.close()
except IOError:
ctx.ui.error('\n!!! ActionsAPI [echo]: Can\'t append to file...\n')
else:
ctx.ui.error('\n!!! ActionsAPI [echo]: File doesn\'t exists...\n')
def chmod(sourceFile, mode = 0755):
'''change the mode of sourceFile to the mode'''
for file in glob.glob(sourceFile):