From 2ed414a46cd29bd0a9116981f8aa768a5e5d21b6 Mon Sep 17 00:00:00 2001 From: xzg Date: Mon, 4 Dec 2017 22:45:17 +0800 Subject: [PATCH] Add describetion for makedirs in file --- docs/file.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/file.rst b/docs/file.rst index e69de29..2d9eff0 100644 --- a/docs/file.rst +++ b/docs/file.rst @@ -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. + + +