def METHOD_NAME(self, parent, previousFile=None):
    """Create a file dialog configured with a default path.
    :rtype: qt.QFileDialog
    """
    dialog = qt.QFileDialog(parent)
    dialog.finished.connect(functools.partial(self.__saveDialogState, dialog))
    self.__configureDialog(dialog)
    if previousFile is not None:
        if os.path.exists(previousFile):
            if os.path.isdir(previousFile):
                directory = previousFile
            else:
                directory = os.path.dirname(previousFile)
            dialog.setDirectory(directory)
    return dialog