def _new(self, vd, name, parent, seqnum, isdir, length, xa):
        '''
        Internal method to create a new Directory Record.
        Parameters:
         vd - The Volume Descriptor this record is part of.
         name - The name for this directory record.
         parent - The parent of this directory record.
         seqnum - The sequence number to associate with this directory record.
         isdir - Whether this directory record represents a directory.
         length - The length of the data for this directory record.
         xa - True if this is an Extended Attribute record.
        Returns:
         Nothing.
        '''
        self.date = dates.DirectoryRecordDate()
        self.date.new()
        if length > 2**32 - 1:
            raise pycdlibexception.PyCdlibInvalidInput('Maximum supported file length is 2^32-1')
        self.data_length = length
        self.file_ident = name
        self.isdir = isdir
        self.seqnum = seqnum
        self.orig_extent_loc = None
        self.len_fi = len(self.file_ident)
        self.dr_len = struct.calcsize(self.FMT) + self.len_fi
        self.file_flags = 0
        if self.isdir:
            self.file_flags |= (1 << self.FILE_FLAG_DIRECTORY_BIT)
        self.file_unit_size = 0
        self.interleave_gap_size = 0
        self.xattr_len = 0
        self.parent = parent
        if parent is None:
            self.is_root = True
        if xa:
            self.xa_record = XARecord()
            self.xa_record.new()
            self.dr_len += XARecord.length()
        self.dr_len += (self.dr_len % 2)
        if self.is_root:
            self._printable_name = b'/'
        elif self.file_ident == b'\x00':
            self._printable_name = b'.'
        elif self.file_ident == b'\x01':
            self._printable_name = b'..'
        else:
            self._printable_name = self.file_ident
        self.vd = vd
        self._initialized = True