Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARROW-16247: [GLib] Add GArrowGCSFileSystem #12931

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 19 additions & 0 deletions c_glib/arrow-glib/file-system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ G_BEGIN_DECLS
* #GArrowS3GlobalOptions is a class for options to initialize S3 APIs.
*
* #GArrowS3FileSystem is a class for S3-backed file system.
*
* #GArrowGCSFileSystem is a class for GCS-backed file system.
*/

/* arrow::fs::FileInfo */
Expand Down Expand Up @@ -1593,6 +1595,21 @@ garrow_s3_file_system_class_init(GArrowS3FileSystemClass *klass)
}


G_DEFINE_TYPE(GArrowGCSFileSystem,
garrow_gcs_file_system,
GARROW_TYPE_FILE_SYSTEM)

static void
garrow_gcs_file_system_init(GArrowGCSFileSystem *file_system)
{
}

static void
garrow_gcs_file_system_class_init(GArrowGCSFileSystemClass *klass)
{
}


G_END_DECLS

GArrowFileInfo *
Expand Down Expand Up @@ -1623,6 +1640,8 @@ garrow_file_system_new_raw(
file_system_type = GARROW_TYPE_HDFS_FILE_SYSTEM;
} else if (type_name == "s3") {
file_system_type = GARROW_TYPE_S3_FILE_SYSTEM;
} else if (type_name == "gcs") {
file_system_type = GARROW_TYPE_GCS_FILE_SYSTEM;
} else if (type_name == "mock") {
file_system_type = GARROW_TYPE_MOCK_FILE_SYSTEM;
}
Expand Down
12 changes: 12 additions & 0 deletions c_glib/arrow-glib/file-system.h
Original file line number Diff line number Diff line change
Expand Up @@ -333,4 +333,16 @@ struct _GArrowS3FileSystemClass
};


#define GARROW_TYPE_GCS_FILE_SYSTEM (garrow_gcs_file_system_get_type())
G_DECLARE_DERIVABLE_TYPE(GArrowGCSFileSystem,
garrow_gcs_file_system,
GARROW,
GCS_FILE_SYSTEM,
GArrowFileSystem)
struct _GArrowGCSFileSystemClass
{
GArrowFileSystemClass parent_class;
};


G_END_DECLS