/* * call-seq: * rename(old_path, new_path) * * インデックスファイルのリネーム。 * * === Argument * old_path [String] :: 元ファイル名 * new_path [Stirng] :: 新ファイル名 * * === Exception * Senna::Error:: インデックスのリネームに失敗した */ static VALUE index_rename(VALUE klass, VALUE old_path, VALUE new_path) { char *s_old_path; char *s_new_path; sen_rc rc; Check_SafeStr(old_path); Check_SafeStr(new_path); s_old_path = RSTRING_PTR(old_path); s_new_path = RSTRING_PTR(new_path); if ((rc = sen_index_rename(s_old_path, s_new_path)) != sen_success) senna_error(rc, "cannot rename %s to %s", s_old_path, s_new_path); return Qnil; }