MCPcopy Create free account
hub / github.com/apache/arrow / garrow_file_info_class_init

Function garrow_file_info_class_init

c_glib/arrow-glib/file-system.cpp:181–297  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

179}
180
181static void
182garrow_file_info_class_init(GArrowFileInfoClass *klass)
183{
184 GParamSpec *spec;
185
186 auto gobject_class = G_OBJECT_CLASS(klass);
187
188 gobject_class->finalize = garrow_file_info_finalize;
189 gobject_class->set_property = garrow_file_info_set_property;
190 gobject_class->get_property = garrow_file_info_get_property;
191
192 auto info = arrow::fs::FileInfo();
193
194 /**
195 * GArrowFileInfo:type:
196 *
197 * The type of the entry.
198 *
199 * Since: 0.17.0
200 */
201 spec = g_param_spec_enum("type",
202 "Type",
203 "The type of the entry",
204 GARROW_TYPE_FILE_TYPE,
205 GARROW_FILE_TYPE_UNKNOWN,
206 static_cast<GParamFlags>(G_PARAM_READWRITE));
207 g_object_class_install_property(gobject_class, PROP_FILE_INFO_TYPE, spec);
208
209 /**
210 * GArrowFileInfo:path:
211 *
212 * The full file path in the file system.
213 *
214 * Since: 0.17.0
215 */
216 spec = g_param_spec_string("path",
217 "Path",
218 "The full file path",
219 info.path().c_str(),
220 static_cast<GParamFlags>(G_PARAM_READWRITE));
221 g_object_class_install_property(gobject_class, PROP_FILE_INFO_PATH, spec);
222
223 /**
224 * GArrowFileInfo:base-name:
225 *
226 * The file base name (component after the last directory separator).
227 *
228 * Since: 0.17.0
229 */
230 spec = g_param_spec_string("base-name",
231 "Base name",
232 "The file base name",
233 info.base_name().c_str(),
234 static_cast<GParamFlags>(G_PARAM_READABLE));
235 g_object_class_install_property(gobject_class, PROP_FILE_INFO_BASE_NAME, spec);
236
237 /**
238 * GArrowFileInfo:dir-name:

Callers

nothing calls this directly

Calls 7

base_nameMethod · 0.80
dir_nameMethod · 0.80
extensionMethod · 0.80
FileInfoClass · 0.50
pathMethod · 0.45
sizeMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected