| 1 | /* |
| 2 | Copyright (C) 2010-2018 Brazil |
| 3 | Copyright (C) 2025 Sutou Kouhei <[email protected]> |
| 4 | |
| 5 | This library is free software; you can redistribute it and/or |
| 6 | modify it under the terms of the GNU Lesser General Public |
| 7 | License as published by the Free Software Foundation; either |
| 8 | version 2.1 of the License, or (at your option) any later version. |
| 9 | |
| 10 | This library is distributed in the hope that it will be useful, |
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | Lesser General Public License for more details. |
| 14 | |
| 15 | You should have received a copy of the GNU Lesser General Public |
| 16 | License along with this library; if not, write to the Free Software |
| 17 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 18 | */ |
| 19 | |
| 20 | #pragma once |
| 21 | |
| 22 | #include "grn.h" |
| 23 | #include "grn_ctx.h" |
| 24 | |
| 25 | #ifdef __cplusplus |
| 26 | extern "C" { |
| 27 | #endif |
| 28 | |
| 29 | GRN_API char * |
| 30 | grn_path_separator_to_system(char *dest, char *groonga_path); |
| 31 | |
| 32 | void |
| 33 | grn_p_record(grn_ctx *ctx, grn_obj *table, grn_id id); |
| 34 | grn_rc |
| 35 | grn_record_inspect_without_columns(grn_ctx *ctx, |
| 36 | grn_obj *buffer, |
| 37 | grn_obj *record); |
| 38 | grn_rc |
| 39 | grn_uvector_record_inspect_without_columns(grn_ctx *ctx, |
| 40 | grn_obj *buffer, |
| 41 | grn_obj *records); |
| 42 | |
| 43 | /* |
| 44 | * grn_mkstemp generates a unique filename from path_template, creates a |
| 45 | * file with permissions 0600 and returns a open file desciptor for the file. |
| 46 | * The last 6 bytes of path_template must be "XXXXXX" and these are replaced |
| 47 | * with a string that makes the filename unique. |
| 48 | */ |
| 49 | int |
| 50 | grn_mkstemp(char *path_template); |
| 51 | bool |
| 52 | grn_path_exist(const char *path); |
| 53 | grn_rc |
| 54 | grn_path_copy(grn_ctx *ctx, |
| 55 | const char *source_path, |
| 56 | const char *destination_path); |
| 57 | |
| 58 | int |
| 59 | grn_tokenize(const char *str, |
| 60 | size_t str_len, |
| 61 | const char **tokbuf, |
| 62 | int buf_size, |
| 63 | const char **rest); |
| 64 | |
| 65 | #ifdef __cplusplus |
| 66 | } |
| 67 | #endif |