From bfb19a9c1a6aae85f8d820cf6f95cb300c8a6a8d Mon Sep 17 00:00:00 2001 From: xzg Date: Sat, 9 Dec 2017 22:10:27 +0800 Subject: [PATCH 1/2] Modify file.rst --- docs/file.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/file.rst b/docs/file.rst index 3728618..fd4a620 100644 --- a/docs/file.rst +++ b/docs/file.rst @@ -74,7 +74,6 @@ File symlink will be created instead of copying the file it points to,else the contents of the file pointed to by symbolic links is copied. - example:copy a symlink >>> from pydu.file import copy,symlink >>> from pydu.file import makedirs,open_fle >>> open_fle('test/test.txt') From 661dda03645b46aeab73386a909d3e3eae0797d3 Mon Sep 17 00:00:00 2001 From: xzg Date: Sat, 9 Dec 2017 23:50:44 +0800 Subject: [PATCH 2/2] Modify file.rst --- docs/file.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/file.rst b/docs/file.rst index fd4a620..88d0c10 100644 --- a/docs/file.rst +++ b/docs/file.rst @@ -19,12 +19,12 @@ File .. py:function:: pydu.file.remove(path, mode=0o755, ignore_errors=False, onerror) Remove a file or directory. - If ignore_errors is set, errors are ignored; otherwise, if onerror - is set, it is called to handle the error with arguments (func, - path, exc_info) where func is platform and implementation dependent; - path is the argument to that function that caused it to fail; and - exc_info is a tuple returned by sys.exc_info(). If ignore_errors - is False and onerror is None, an exception is raised. + If ignore_errors is set, errors are ignored; otherwise, if `onerror` + is set, it is called to handle the error with arguments (`func` , + `path` , `exc_info` ) where func is platform and implementation dependent; + `path` is the argument to that function that caused it to fail; and + `exc_info` is a tuple returned by `sys.exc_info()`. If `ignore_errors` + is `False` and `onerror` is None, an exception is raised. >>> from pydu.file import makedirs >>> from pydu.file import remove @@ -113,7 +113,7 @@ File `link` only work on `Linux/Unix`,it create a hard link pointing to source named link_name.If dist is exist and overwrite is true,a - new symlink will be created. + new link will be created. >>> from pydu.file import link >>> link('test.txt','test.link')