'Stage selected files, or all files if no selection exists.'

def stage(self):

    paths = selection_model().unstaged
    if (not paths):
        cmds.do(cmds.StageModified)
    else:
        cmds.do(cmds.Stage, paths)
