(self, letter, path, cwd, codepage, text_mode, soft_linefeed)
Initialise a disk device.
Initialise a disk device.
Initialise a disk device .
def __init__(self, letter, path, cwd, codepage, text_mode, soft_linefeed):
        """Initialise a disk device."""
        assert isinstance(cwd, text_type), type(cwd)
        # DOS drive letter
        self.letter = letter
        # mount root: this is a native filesystem path, using os.sep
        self._native_root = path
        # code page for file system names and text file conversion
        self._codepage = codepage
        # current native working directory on this drive
        self._native_cwd = u''
        if self._native_root:
            self._native_cwd = cwd
        # locks are drive-specific
        self._locks = Locks()
        # text file settings
        self._text_mode = text_mode
        self._soft_linefeed = soft_linefeed
def __init__ ( self , letter , path , cwd , codepage , text_mode , soft_linefeed ) : assert isinstance ( cwd , text_type ) , type ( cwd ) # DOS drive letter self . letter = letter # mount root: this is a native filesystem path, using os.sep self . _native_root = path # code page for file system names and text file conversion self . _codepage = codepage # current native working directory on this drive self . _native_cwd = u'' if self . _native_root : self . _native_cwd = cwd # locks are drive-specific self . _locks = Locks ( ) # text file settings self . _text_mode = text_mode self . _soft_linefeed = soft_linefeed