Add describetion for makedirs in file

This commit is contained in:
xzg 2017-12-04 22:45:17 +08:00
parent 4a4c1f84e7
commit 2ed414a46c
1 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,17 @@
File
-------
.. py:function:: pydu.file.makedirs(path, mode=0o755, ignore_errors=False, exist_ok=False)
Create a leaf directory and all intermediate ones.
>>> from pydu.file import makedirs
>>> makedirs('test/test')
>>> makedirs('test/test/test')
>>> makedirs('test',exist_ok=True)
>>> makedirs('test')
Traceback (most recent call last):
... OSError: Create dir: {} error.