Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
ó
MEYc@s¯dZddlZddlZddlZddlZddlZddlmZejej	Bej
BZed„Zej
d„Zejed„ƒZdddd	„ZdS(
s(
File utilities.

.. versionadded:: 1.8
iÿÿÿÿN(texcutilscCs^ytj||ƒWnCtk
rY}|jtjkrStjj|ƒsV‚qVqZ‚nXdS(s•Create a directory (and any ancestor directories required)

    :param path: Directory to create
    :param mode: Directory creation permissions
    N(tostmakedirstOSErrorterrnotEEXISTtpathtisdir(Rtmodetexc((sI/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_utils/fileutils.pytensure_tree!s	cCs@y||ƒWn+tk
r;}|jtjkr<‚q<nXdS(sDelete a file, but ignore file not found error.

    :param path: File to delete
    :param remove: Optional function to remove passed path
    N(RRtENOENT(Rtremovete((sI/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_utils/fileutils.pytdelete_if_exists1s
ccs>y	dVWn.tk
r9tjƒ||ƒWdQXnXdS(sËProtect code that wants to operate on PATH atomically.
    Any exception will cause PATH to be removed.

    :param path: File to work with
    :param remove: Optional function to remove passed path
    N(t	ExceptionRtsave_and_reraise_exception(RR((sI/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_utils/fileutils.pytremove_path_on_error?s
		

tttmpcCs`|rt|ƒntjd|d|d|ƒ\}}ztj||ƒWdtj|ƒX|S(sCreate a temporary file containing data.

    Create a temporary file containing specified content, with a specified
    filename suffix and prefix. The tempfile will be created in a default
    location, or in the directory `path`, if it is not None. `path` and its
    parent directories will be created if they don't exist.

    :param content: bytestring to write to the file
    :param path: same as parameter 'dir' for mkstemp
    :param suffix: same as parameter 'suffix' for mkstemp
    :param prefix: same as parameter 'prefix' for mkstemp

    For example: it can be used in database tests for creating
    configuration files.

    .. versionadded:: 1.9
    tsuffixtdirtprefixN(R
ttempfiletmkstempRtwritetclose(tcontentRRRtfd((sI/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_utils/fileutils.pytwrite_to_tempfileOs
$(t__doc__t
contextlibRRtstatRt
oslo_utilsRtS_IRWXUtS_IRWXGtS_IRWXOt
_DEFAULT_MODER
tunlinkRtcontextmanagerRtNoneR(((sI/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_utils/fileutils.pyt<module>s