提交 3e834fec 编写于 作者: X xiexionghang

commit kagle for paddle

上级 b556097a
...@@ -12,7 +12,8 @@ def is_afs_path(path): ...@@ -12,7 +12,8 @@ def is_afs_path(path):
return True return True
return False return False
class LocalFSClient:
class LocalFSClient(object):
""" """
Util for local disk file_system io Util for local disk file_system io
""" """
...@@ -75,10 +76,11 @@ class LocalFSClient: ...@@ -75,10 +76,11 @@ class LocalFSClient:
"""R """R
""" """
files = os.listdir(path) files = os.listdir(path)
files = [ path + '/' + fi for fi in files ] files = [path + '/' + fi for fi in files]
return files return files
class FileHandler:
class FileHandler(object):
""" """
A Smart file handler. auto judge local/afs by path A Smart file handler. auto judge local/afs by path
""" """
...@@ -128,7 +130,6 @@ class FileHandler: ...@@ -128,7 +130,6 @@ class FileHandler:
else: else:
self._local_fs_client.write(content, dest_path, mode) self._local_fs_client.write(content, dest_path, mode)
def cat(self, path): def cat(self, path):
"""R """R
""" """
...@@ -148,7 +149,6 @@ class FileHandler: ...@@ -148,7 +149,6 @@ class FileHandler:
else: else:
return self._local_fs_client.ls(path) return self._local_fs_client.ls(path)
def cp(self, org_path, dest_path): def cp(self, org_path, dest_path):
"""R """R
""" """
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册