'Ensure the resource is in its desired state.'

def check(self, module, perms_required=True):

    def _check_state():
        return os.path.exists(self.path)
    def _check_perms(module):
        file_args = module.load_file_common_arguments(module.params)
        return (not module.set_fs_attributes_if_different(file_args, False))
    if (not perms_required):
        return _check_state()
    return (_check_state() and _check_perms(module))
