def do_cd(self, command):
        """cd <interface> <dirname>: change path of 'interface' to 'dirname'."""
        fsi, name = self.parse_fs_command(command, nargs=1)
        if (fsi is None) or (name is None):
            return
        if name == "..":
            isdir = True
        else:
            try:
                isdir = fsi.isdir(name)
            except:
                isdir = True
                # lets just try. It worked before isdir() was added so it should still work
        if not isdir:
            self.stdout.write(Text("Error: dirname does not refer to a dir!\n", "red"))
            return
        try:
            fsi.cd(name)
        except IsFile:
            self.stdout.write(Text("Error: dirname does not refer to a dir!\n", "red"))
        except OperationFailure as e:
            self.stdout.write(Text("Error: {m}\n".format(m=e.message), "red"))
cd <interface> <dirname>: change path of 'interface' to 'dirname'.
bin/mc.py