|
|
@ -121,7 +121,6 @@ class files_api: |
|
|
|
def getDirSizeApi(self): |
|
|
|
def getDirSizeApi(self): |
|
|
|
path = request.form.get('path', '') |
|
|
|
path = request.form.get('path', '') |
|
|
|
tmp = self.getDirSize(path) |
|
|
|
tmp = self.getDirSize(path) |
|
|
|
# print(tmp) |
|
|
|
|
|
|
|
return mw.returnJson(True, tmp[0].split()[0]) |
|
|
|
return mw.returnJson(True, tmp[0].split()[0]) |
|
|
|
|
|
|
|
|
|
|
|
def getDirApi(self): |
|
|
|
def getDirApi(self): |
|
|
@ -153,7 +152,6 @@ class files_api: |
|
|
|
mw.writeLog('文件管理', msg) |
|
|
|
mw.writeLog('文件管理', msg) |
|
|
|
return mw.returnJson(True, '文件创建成功!') |
|
|
|
return mw.returnJson(True, '文件创建成功!') |
|
|
|
except Exception as e: |
|
|
|
except Exception as e: |
|
|
|
# print str(e) |
|
|
|
|
|
|
|
return mw.returnJson(True, '文件创建失败!') |
|
|
|
return mw.returnJson(True, '文件创建失败!') |
|
|
|
|
|
|
|
|
|
|
|
def createDirApi(self): |
|
|
|
def createDirApi(self): |
|
|
@ -273,7 +271,6 @@ done |
|
|
|
else: |
|
|
|
else: |
|
|
|
data['files'].append(tmp) |
|
|
|
data['files'].append(tmp) |
|
|
|
except Exception as e: |
|
|
|
except Exception as e: |
|
|
|
# print(e) |
|
|
|
|
|
|
|
continue |
|
|
|
continue |
|
|
|
return mw.returnJson(True, 'OK', data) |
|
|
|
return mw.returnJson(True, 'OK', data) |
|
|
|
|
|
|
|
|
|
|
@ -451,8 +448,6 @@ done |
|
|
|
else: |
|
|
|
else: |
|
|
|
filesx.append(filename) |
|
|
|
filesx.append(filename) |
|
|
|
|
|
|
|
|
|
|
|
# print(filesx) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for fn in filesx: |
|
|
|
for fn in filesx: |
|
|
|
if fn == '.': |
|
|
|
if fn == '.': |
|
|
|
continue |
|
|
|
continue |
|
|
@ -839,7 +834,6 @@ done |
|
|
|
mtime + ';' + accept + ';' + user + ';' + link) |
|
|
|
mtime + ';' + accept + ';' + user + ';' + link) |
|
|
|
n += 1 |
|
|
|
n += 1 |
|
|
|
except Exception as e: |
|
|
|
except Exception as e: |
|
|
|
#print('getdir:dd.', e) |
|
|
|
|
|
|
|
continue |
|
|
|
continue |
|
|
|
data['DIR'] = sorted(dirnames) |
|
|
|
data['DIR'] = sorted(dirnames) |
|
|
|
data['FILES'] = sorted(filenames) |
|
|
|
data['FILES'] = sorted(filenames) |
|
|
|