def _update_path ( self, path ):
        """ Updates the various file lists to reflect that *path* has been
            selected.
        """
        file = None
        if isfile( path ):
            file = path
            path = dirname( path )
            if self.type != 'path':
                self.value = file

        if path != self.cur_path:
            files = []
            if path == WindowsRoot:
                from facets.core.facet_base import system_drives

                paths = [ WindowsRoot ] + system_drives()
            elif isdir( path ):
                paths = []
                try:
                    for name in sorted( listdir( path ) ):
                        full_name = join( path, name )
                        if isdir( full_name ):
                            paths.append( '.' + full_name )
                        else:
                            files.append( full_name )
                except:
                    # The user may not have permission to access this path:
                    paths.append( '?Access denied' )

                parent = path
                while True:
                    next_path = parent
                    paths.insert( 0, next_path )
                    parent = dirname( next_path )
                    if parent == next_path:
                        if is_windows:
                            paths.insert( 0, WindowsRoot )

                        break
            else:
                return

            self._ignore_set = True
            self.cur_path    = path
            self.paths       = paths
            self.path        = path
            self.files       = files
            self.file        = file
            if (self.type != 'file') and (file is None):
                self.value = path

            self._ignore_set = False