1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-12-17 23:24:20 +00:00
royalnet/filemanager.py

14 lines
340 B
Python
Raw Normal View History

# -*- coding: utf-8 -*-
2015-10-03 16:34:38 +00:00
def readFile(name):
"""Leggi i contenuti di un file."""
file = open(name, 'r')
content = file.read()
file.close()
return content
def writeFile(name, content):
"""Scrivi qualcosa su un file, sovrascrivendo qualsiasi cosa ci sia al suo interno."""
file = open(name, 'w')
file.write(content)
file.close()