Current Path : /usr/lib/python2.7/dist-packages/twisted/persisted/ |
Current File : //usr/lib/python2.7/dist-packages/twisted/persisted/dirdbm.pyc |
[XMc @ s d Z d d l Z d d l Z d d l Z d d l Z y d d l Z Wn e k re d d l Z n Xy e Wn e k r e Z n Xd f d YZ d e f d YZ e e d Z d d d g Z d S( s DBM-style interface to a directory. Each key is stored as a single file. This is not expected to be very fast or efficient, but it's good for easy debugging. DirDBMs are *not* thread-safe, they should only be accessed by one thread at a time. No files should be placed in the working directory of a DirDBM save those created by the DirDBM itself! Maintainer: Itamar Shtull-Trauring iNt DirDBMc B s e Z d Z d Z d Z d Z d Z d Z d Z d Z d Z d Z d Z d Z d Z d Z d Z d d Z d Z d Z d Z d Z d Z d Z RS( s A directory with a DBM interface. This class presents a hash-like interface to a directory of small, flat files. It can only use strings as keys or values. c C s t j j | | _ t j j | j s= t j | j n x6 t j t j j | j d D] } t j | q_ Wt j t j j | j d } xJ | D]B } | d } t j j | r t j | q t j | | q Wd S( sb @type name: str @param name: Base path to use for the directory storage. s *.news *.rpliN( t ost patht abspatht dnamet isdirt mkdirt globt joint removet existst rename( t selft namet ft replacementst old( ( s<