Exemplo n.º 1
0
def filelist(**args):
	"""retun list of files"""
	ret = []
	import os
	import datetime
	
	for wt in os.walk(filespath()):
		for fn in wt[2]:
			fpath = os.path.join(wt[0], fn)
			ret.append([fpath, \
				str(datetime.datetime.fromtimestamp(os.stat(fpath).st_mtime)), \
				os.stat(fpath).st_size])

	return {'files':ret}
Exemplo n.º 2
0
def filelist(**args):
    """retun list of files"""
    ret = []
    import os
    import datetime

    for wt in os.walk(filespath()):
        for fn in wt[2]:
            fpath = os.path.join(wt[0], fn)
            ret.append([fpath, \
             str(datetime.datetime.fromtimestamp(os.stat(fpath).st_mtime)), \
             os.stat(fpath).st_size])

    return {'files': ret}
Exemplo n.º 3
0
def save(fname, content):
	"""save the file"""
	f = open(os.path.join(filespath(), fname), 'w+')
	f.write(content)
	f.close()
Exemplo n.º 4
0
def save(fname, content):
    """save the file"""
    f = open(os.path.join(filespath(), fname), 'w+')
    f.write(content)
    f.close()