You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by mr...@apache.org on 2020/01/08 11:28:10 UTC
[arrow] 01/02: Return the result of garrow::check
This is an automated email from the ASF dual-hosted git repository.
mrkn pushed a commit to branch ARROW-7444
in repository https://gitbox.apache.org/repos/asf/arrow.git
commit 438fa08bffc71130f04bf5e8a176465be894f916
Author: Kenta Murata <mr...@mrkn.jp>
AuthorDate: Wed Jan 8 18:09:56 2020 +0900
Return the result of garrow::check
---
c_glib/arrow-glib/file-system.cpp | 28 +++++++++++-----------
c_glib/arrow-glib/file-system.h | 50 +++++++++++++++++++--------------------
2 files changed, 39 insertions(+), 39 deletions(-)
diff --git a/c_glib/arrow-glib/file-system.cpp b/c_glib/arrow-glib/file-system.cpp
index d68595d..73e0f7b 100644
--- a/c_glib/arrow-glib/file-system.cpp
+++ b/c_glib/arrow-glib/file-system.cpp
@@ -609,7 +609,7 @@ garrow_file_system_get_target_stats_selector(GArrowFileSystem *file_system,
*
* Since: 1.0.0
*/
-void
+gboolean
garrow_file_system_create_dir(GArrowFileSystem *file_system,
const gchar *path,
gboolean recursive,
@@ -617,7 +617,7 @@ garrow_file_system_create_dir(GArrowFileSystem *file_system,
{
auto arrow_file_system = garrow_file_system_get_raw(file_system);
auto status = arrow_file_system->CreateDir(path, recursive);
- (void)garrow::check(error, status, "[filesystem][create-dir]");
+ return garrow::check(error, status, "[filesystem][create-dir]");
}
/**
@@ -630,14 +630,14 @@ garrow_file_system_create_dir(GArrowFileSystem *file_system,
*
* Since: 1.0.0
*/
-void
+gboolean
garrow_file_system_delete_dir(GArrowFileSystem *file_system,
const gchar *path,
GError **error)
{
auto arrow_file_system = garrow_file_system_get_raw(file_system);
auto status = arrow_file_system->DeleteDir(path);
- (void)garrow::check(error, status, "[filesystem][delete-dir]");
+ return garrow::check(error, status, "[filesystem][delete-dir]");
}
/**
@@ -652,14 +652,14 @@ garrow_file_system_delete_dir(GArrowFileSystem *file_system,
*
* Since: 1.0.0
*/
-void
+gboolean
garrow_file_system_delete_dir_contents(GArrowFileSystem *file_system,
const gchar *path,
GError **error)
{
auto arrow_file_system = garrow_file_system_get_raw(file_system);
auto status = arrow_file_system->DeleteDirContents(path);
- (void)garrow::check(error, status, "[filesystem][delete-dir-contents]");
+ return garrow::check(error, status, "[filesystem][delete-dir-contents]");
}
/**
@@ -672,14 +672,14 @@ garrow_file_system_delete_dir_contents(GArrowFileSystem *file_system,
*
* Since: 1.0.0
*/
-void
+gboolean
garrow_file_system_delete_file(GArrowFileSystem *file_system,
const gchar *path,
GError **error)
{
auto arrow_file_system = garrow_file_system_get_raw(file_system);
auto status = arrow_file_system->DeleteFile(path);
- (void)garrow::check(error, status, "[filesystem][delete-file]");
+ return garrow::check(error, status, "[filesystem][delete-file]");
}
/**
@@ -693,7 +693,7 @@ garrow_file_system_delete_file(GArrowFileSystem *file_system,
*
* Since: 1.0.0
*/
-void
+gboolean
garrow_file_system_delete_files(GArrowFileSystem *file_system,
const gchar **paths,
gsize n_paths,
@@ -706,7 +706,7 @@ garrow_file_system_delete_files(GArrowFileSystem *file_system,
arrow_paths.emplace_back(paths[i]);
}
auto status = arrow_file_system->DeleteFiles(arrow_paths);
- (void)garrow::check(error, status, "[filesystem][delete-files]");
+ return garrow::check(error, status, "[filesystem][delete-files]");
}
/**
@@ -724,7 +724,7 @@ garrow_file_system_delete_files(GArrowFileSystem *file_system,
*
* Since: 1.0.0
*/
-void
+gboolean
garrow_file_system_move(GArrowFileSystem *file_system,
const gchar *src,
const gchar *dest,
@@ -732,7 +732,7 @@ garrow_file_system_move(GArrowFileSystem *file_system,
{
auto arrow_file_system = garrow_file_system_get_raw(file_system);
auto status = arrow_file_system->Move(src, dest);
- (void)garrow::check(error, status, "[filesystem][move]");
+ return garrow::check(error, status, "[filesystem][move]");
}
/**
@@ -748,7 +748,7 @@ garrow_file_system_move(GArrowFileSystem *file_system,
*
* Since: 1.0.0
*/
-void
+gboolean
garrow_file_system_copy_file(GArrowFileSystem *file_system,
const gchar *src,
const gchar *dest,
@@ -756,7 +756,7 @@ garrow_file_system_copy_file(GArrowFileSystem *file_system,
{
auto arrow_file_system = garrow_file_system_get_raw(file_system);
auto status = arrow_file_system->CopyFile(src, dest);
- (void)garrow::check(error, status, "[filesystem][copy-file]");
+ return garrow::check(error, status, "[filesystem][copy-file]");
}
/**
diff --git a/c_glib/arrow-glib/file-system.h b/c_glib/arrow-glib/file-system.h
index 49ef122..4d4dec0 100644
--- a/c_glib/arrow-glib/file-system.h
+++ b/c_glib/arrow-glib/file-system.h
@@ -171,43 +171,43 @@ GList *garrow_file_system_get_target_stats_selector(GArrowFileSystem *file_syste
GError **error);
GARROW_AVAILABLE_IN_1_0
-void garrow_file_system_create_dir(GArrowFileSystem *file_system,
- const gchar *path,
- gboolean recursive,
- GError **error);
+gboolean garrow_file_system_create_dir(GArrowFileSystem *file_system,
+ const gchar *path,
+ gboolean recursive,
+ GError **error);
GARROW_AVAILABLE_IN_1_0
-void garrow_file_system_delete_dir(GArrowFileSystem *file_system,
- const gchar *path,
- GError **error);
+gboolean garrow_file_system_delete_dir(GArrowFileSystem *file_system,
+ const gchar *path,
+ GError **error);
GARROW_AVAILABLE_IN_1_0
-void garrow_file_system_delete_dir_contents(GArrowFileSystem *file_system,
- const gchar *path,
- GError **error);
+gboolean garrow_file_system_delete_dir_contents(GArrowFileSystem *file_system,
+ const gchar *path,
+ GError **error);
GARROW_AVAILABLE_IN_1_0
-void garrow_file_system_delete_file(GArrowFileSystem *file_system,
- const gchar *path,
- GError **error);
+gboolean garrow_file_system_delete_file(GArrowFileSystem *file_system,
+ const gchar *path,
+ GError **error);
GARROW_AVAILABLE_IN_1_0
-void garrow_file_system_delete_files(GArrowFileSystem *file_system,
- const gchar **paths,
- gsize n_paths,
- GError **error);
+gboolean garrow_file_system_delete_files(GArrowFileSystem *file_system,
+ const gchar **paths,
+ gsize n_paths,
+ GError **error);
GARROW_AVAILABLE_IN_1_0
-void garrow_file_system_move(GArrowFileSystem *file_system,
- const gchar *src,
- const gchar *dest,
- GError **error);
+gboolean garrow_file_system_move(GArrowFileSystem *file_system,
+ const gchar *src,
+ const gchar *dest,
+ GError **error);
GARROW_AVAILABLE_IN_1_0
-void garrow_file_system_copy_file(GArrowFileSystem *file_system,
- const gchar *src,
- const gchar *dest,
- GError **error);
+gboolean garrow_file_system_copy_file(GArrowFileSystem *file_system,
+ const gchar *src,
+ const gchar *dest,
+ GError **error);
GARROW_AVAILABLE_IN_1_0
GArrowInputStream *