summaryrefslogtreecommitdiff
path: root/gio/gfile.h
Commit message (Collapse)AuthorAgeFilesLines
* Rename all visibility macrosXavier Claessens2022-10-131-141/+141
|
* gfile: Add Async API to create a temporary directory and return as GFileMarco Trevisan (Treviño)2022-06-221-0/+9
| | | | | | | While it's possible to create a directory synchronously via g_dir_make_tmp(), there's no such API that performs it asynchronously. So implement it using GFile, using a thread to perform such task.
* gfile: Add API to create a new temporary file asynchronouslyMarco Trevisan (Treviño)2022-06-221-0/+10
| | | | | Make possible to create a new gfile with a temporary name in async way, using the same API of g_file_new_tmp().
* gfile: Implement interface API to make symbolic links asynchronouslyMarco Trevisan (Treviño)2022-06-151-4/+22
| | | | | | | | | | The interface was ready for this API but it was not provided. So implement this, using a thread that calls the sync API for now. Add tests. Helps with: GNOME/glib#157
* gio: Add SPDX license headers automaticallyPhilip Withnall2022-05-181-0/+2
| | | | | | | | | | | | | | Add SPDX license (but not copyright) headers to all files which follow a certain pattern in their existing non-machine-readable header comment. This commit was entirely generated using the command: ``` git ls-files gio/*.[ch] | xargs perl -0777 -pi -e 's/\n \*\n \* This library is free software; you can redistribute it and\/or\n \* modify it under the terms of the GNU Lesser General Public/\n \*\n \* SPDX-License-Identifier: LGPL-2.1-or-later\n \*\n \* This library is free software; you can redistribute it and\/or\n \* modify it under the terms of the GNU Lesser General Public/igs' ``` Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Helps: #1415
* Implement async file movementLucas Schwiderski2022-02-071-4/+28
|
* gio: Expose g_file_build_attribute_list_for_copyMaxim Mikityanskiy2020-10-061-0/+6
| | | | | | | | | | | | | | Expose a function that prepares an attribute query string to be passed to g_file_query_info() to get a list of attributes normally copied with the file. This function is used by the implementation of g_file_copy_attributes, and it's useful if one needs to split g_file_copy_attributes into two stages, for example, when nautilus does a recursive move of a directory. When files are moved from the source directory, its modification time changes. To preserve the mtime on the destination directory, it has to be queried before moving files and set after doing it, hence these two stages. Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>
* gfile: Document a few nullable vfuncsPhilip Withnall2019-09-301-2/+5
| | | | | | | | `GFile` always checks whether these vfuncs are `NULL` before calling them, so document that it’s safe for implementations of `GFile` to not implement them. Signed-off-by: Philip Withnall <withnall@endlessm.com>
* minor typos in the documentation (a/an)Дилян Палаузов2019-08-241-3/+3
|
* gfile: Fix documentation links to non-existent symbolsPhilip Withnall2019-03-151-6/+6
| | | | | | | I presume this documentation was written before those APIs were renamed during code review. Signed-off-by: Philip Withnall <withnall@endlessm.com>
* gfile: Add g_file_query_default_handler_async()Ondrej Holy2019-01-281-0/+11
| | | | | | | | | | | | | This is needed as a first step to fix the g_app_info_launch_default_for_uri_async() function to be really asynchronous. It still uses the g_app_info_get_default_for_uri_scheme() and g_app_info_get_default_for_type() functions, which may use synchronous calls to local MIME DB. https://gitlab.gnome.org/GNOME/glib/issues/1347 https://gitlab.gnome.org/GNOME/glib/issues/1249
* GFile: Add g_file_peek_path()Colin Walters2018-01-151-0/+2
| | | | | | | | | | | | | | | | | | This is a variant of g_file_get_path() which returns a const string to the caller, rather than transferring ownership. I've been carrying `gs_file_get_path_cached()` in libgsystem and it has seen a lot of use in the ostree and flatpak codebases. There are probably others too. I think language bindings like Python/Gjs could also use this to avoid an extra malloc (i.e. we could transparently replace `g_file_get_path()` with `g_file_peek_path()`. (Originally by Colin Walters. Tweaked by Philip Withnall to update to 2.56, change the function name and drop the locking.) https://bugzilla.gnome.org/show_bug.cgi?id=767976
* file: add g_file_load_bytes()Christian Hergert2017-11-151-0/+16
| | | | | | | | | | | This adds g_file_load_bytes() to make it more convenient to load the contents of a GFile as GBytes. It includes a special casing for gresources to increase the chances that the GBytes directly references the embedded data instead of copying to the heap. https://bugzilla.gnome.org/show_bug.cgi?id=790272
* gfile: add g_file_new_build_filename()Cosimo Cecchi2017-11-071-0/+3
| | | | | | | This is a convenience C API that combines g_build_filename() with g_file_new_for_path(). https://bugzilla.gnome.org/show_bug.cgi?id=788488
* gio/: LGPLv2+ -> LGPLv2.1+Sébastien Wilmet2017-05-291-1/+1
| | | | | | | | | | | | | | | | | Sub-directories inside gio/ already processed in a previous commit: - fam/ - gdbus-2.0/ (which contains only codegen/) - gvdb/ - inotify/ - tests/ - win32/ - xdgmime/ Other sub-directories inside gio/: - completion/: no license headers - kqueue/: not LGPL, BSD-style license https://bugzilla.gnome.org/show_bug.cgi?id=776504
* docs: fix up docs issues in gio/Xavier Claessens2015-02-051-0/+3
|
* docs: Remove <!-- --> comment before plural sVolker Sobek2014-04-241-3/+3
| | | | | | | | These did show up in the html. Since symbol names are checked for a trailing plural s when generating the docs, the links stay functional after removing these comments. https://bugzilla.gnome.org/show_bug.cgi?id=728380
* Updated FSF's addressDaniel Mustieles2014-01-311-3/+1
|
* gio: Fix some header/source parameter-naming mismatchesRico Tzschichholz2014-01-221-1/+1
|
* GFile: add GBytes version of _replace_contents_async()Xavier Claessens2013-12-021-0/+9
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=690525
* GFile: add new g_file_measure_disk_usage() APIRyan Lortie2013-09-061-0/+53
| | | | | | | | | This is essentially the equivalent of 'du'. This is currently only supported on local files. gvfs will add support for the interface later. https://bugzilla.gnome.org/show_bug.cgi?id=704893
* Add async version of g_file_make_directory()Sébastien Wilmet2013-04-191-4/+21
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=548353
* Add async version of g_file_trash()Sébastien Wilmet2013-04-101-4/+23
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=548353
* various: add GLIB_AVAILABLE_IN_ALL everywhere elseRyan Lortie2013-01-131-0/+109
| | | | | | | | | | | Add the GLIB_AVAILABLE_IN_ALL annotation to all old functions (that haven't already been annotated with the GLIB_AVAILABLE_IN_* macros or a deprecation macro). If we discover in the future that we cannot use only one macro on Windows, it will be an easy sed patch to fix that. https://bugzilla.gnome.org/show_bug.cgi?id=688681
* Move single-include guards inside include guardsMatthias Clasen2012-12-271-3/+3
| | | | | | gcc has optimizations for include guards that only work if they are outermost in the the header. https://bugzilla.gnome.org/show_bug.cgi?id=689810
* gio: New API for GFile from remote commandline argRyan Lortie2012-11-271-0/+3
| | | | | | | | | Add a pair of new APIs: one to GFile to create a new file from a commandline arg relative to a given cwd and one to GApplicationCommandLine to create a GFile from an arg, relative to the cwd of the invoking commandline. https://bugzilla.gnome.org/show_bug.cgi?id=689037
* GFile: Add g_file_delete_async()Colin Walters2012-07-301-4/+23
| | | | | | | | | | | This looks like it was stubbed out but not implemented; the vtable entry dates to commit 3781343738de4abddf56982325a77bd70a98cd26 which is just alex's initial merge of gio into glib. I was working on some code that wants an asynchronous rm -rf equivalent, and so yeah, this is desirable. https://bugzilla.gnome.org/show_bug.cgi?id=680760
* Annotate API introduced for 2.32 with GLIB_AVAILABLE_IN_2_32Colin Walters2012-05-261-0/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=676816
* gfile: Don't use C++ keyword "template" as variable nameColin Walters2011-12-091-1/+1
| | | | This breaks autotestkeyword.cc from gtk+.
* GFile: add g_file_new_tempThomas Hindoe Paaboel Andersen2011-12-091-0/+3
| | | | | | | | | A convenience function that creates a temporary file and returns a GFile and GFileIOStream for it. The file is created using g_file_open_tmp. https://bugzilla.gnome.org/show_bug.cgi?id=657085
* GIO: Don't use G_DISABLE_DEPRECATED for functionsMatthias Clasen2011-11-031-4/+0
|
* Use GLIB_DEPRECATED instead of G_GNUC_DEPRECATED in our headersChun-wei Fan2011-10-111-4/+10
| | | | | | | This will let others opt out of seeing GLib deprecation warnings by defining GLIB_DISABLE_DEPRECATION_WARNINGS. https://bugzilla.gnome.org/show_bug.cgi?id=661438
* Add G_GNUC_DEPRECATED to deprecated functions in gioMatthias Clasen2011-10-081-12/+12
|
* Bug 535159 - g_file_has_parentRyan Lortie2009-11-171-0/+2
| | | | | - add a g_file_has_parent() function as a wrapper around g_file_get_parent()
* Document support_thread_contextsMatthias Clasen2009-07-061-0/+1
|
* Allow interaction when unmounting mountsDavid Zeuthen2009-07-051-0/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For details, see bug 587482. The new api: - Provide new _with_operation() variants of all unmount and eject methods - Add GMountOperation::show-processes signal - this can be used to show processes blocking an unmount operation - Deprecate all unmount and eject methods - Add g_drive_can_start_degraded() method - this is to avoid auto-starting degraded drives - Make g_drive_stop() resp. g_file_stop_mountable() take a GMountOperation - these ops were recently added and not yet public API so it's fine to change how they work - Provide a way to poll mountable files, e.g. g_file_poll_mountable() - Add some missing file attributes for mountable files - G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE - needed for the GDU Nautilus extensions to format a volume - G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED: - mimics g_drive_can_start_degraded() - G_FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL: - mimics g_drive_can_poll_for_media() - G_FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC - mimics g_drive_is_media_check_automatic()
* Support g_main_context_push_thread_default() in gioDan Winship2009-07-011-0/+3
| | | | | | | | | | | | GFile allows for the possibility that external implementations may not support thread-default contexts yet, via g_file_supports_thread_contexts(). GVolumeMonitor is not yet thread-default-context aware. Add a test program to verify that basic gio async ops work correctly in non-default contexts. http://bugzilla.gnome.org/show_bug.cgi?id=579984
* Bug 585591 – Starting/stopping drivesDavid Zeuthen2009-06-151-0/+41
| | | | | | | | | | | | | | | | | Add API for starting/stopping drives. This new API will enable GVolumeMonitor and GVfs implementations to add support for the following features 1. Powering down external hard disk enclosures / drives 2. Starting/stopping multi-disk devices (such as RAID/btrfs/ZFS) 3. Connecting/disconnecting iSCSI devices 4. Reacting to the user pressing e.g. the "remove drive" button on a IBM/Lenovo Ultrabay: http://www.thinkwiki.org/wiki/Ultrabay See the bug for the corresponding GVfs and Nautilus changes.
* Update the docs for the new network APIsAlexander Larsson2009-05-181-0/+9
| | | | | This imports the network APIs into the gio reference docs, and cleans up a bunch of gtk-doc warnings and documentation issues.
* Add GIOStream operations to GFileAlexander Larsson2009-05-131-0/+83
| | | | | g_file_open_readwrite, g_file_create_readwrite, g_file_replace_readwrite and async variants, with default implementations using threads.
* big header formatting cleanup: indentation, vtable formatting, consistentMichael Natterer2008-09-021-301/+298
| | | | | | | | | | | | 2008-09-02 Michael Natterer <mitch@imendio.com> * *.h: big header formatting cleanup: indentation, vtable formatting, consistent spacing in (* vfunc), trailing whitespace removal. Formatting should be pretty consistent in all GIO headers now. svn path=/trunk/; revision=7433
* Add g_file_monitorMatthias Clasen2008-07-021-0/+4
| | | | svn path=/trunk/; revision=7145
* Moved all relevant typedefs into these files.Cody Russell2008-07-011-127/+1
| | | | | | | | | | | | | | | | 2008-07-01 Cody Russell <bratsche@gnome.org> * gio/gioenums.h: * gio/giotypes.h: Moved all relevant typedefs into these files. * gio/*.[ch]: Updated wrt added files. Split types into separate file for easier maintainership. (#538564) svn path=/trunk/; revision=7127
* Bug 536252 – GFileEnumerator should allow access to the containing GFileRoss Burton2008-06-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 2008-06-16 Ross Burton <ross@burtonini.com> Bug 536252 – GFileEnumerator should allow access to the containing GFile * gio/gfileenumerator.c: * gio/gfileenumerator.h: * gio/gfile.h: Add g_file_enumerator_get_container() and a container writeable construct-only property. Also shuffle around typedefs to make it compile. * gio/glocalfileenumerator.c: * gio/glocalfileenumerator.h: * gio/glocalfile.c: Instead of a string filename take a GFile in the constructor and use it to set the container property. * gio/gio.symbols: * docs/reference/gio/gio-sections.txt: Update with new API. svn path=/trunk/; revision=7044
* Bug 511367 - add g_file_make_directory_with_parents.Ross Burton2008-06-111-0/+3
| | | | | | | | | | | | 2008-06-11 Ross Burton <ross@burtonini.com> Bug 511367 - add g_file_make_directory_with_parents. * gio/gfile.c: * gio/gfile.h: * gio/gio.symbols: Add g_file_make_directory_with_parents. svn path=/trunk/; revision=7001
* Add g_file_query_file_type convenience function to query the type of aMatthias Clasen2008-03-311-0/+3
| | | | | | | | | | | | | 2008-03-30 Matthias Clasen <mclasen@redhat.com> * gio.symbols: * gfile.c: * gfile.h: Add g_file_query_file_type convenience function to query the type of a file. (#520715, Mikkel Kamstrup Erlandsen) svn path=/trunk/; revision=6784
* Remove deprecated g_file_contains_file.Alexander Larsson2008-02-251-3/+0
| | | | | | | | | | 2008-02-25 Alexander Larsson <alexl@redhat.com> * gfile.[ch]: Remove deprecated g_file_contains_file. svn path=/trunk/; revision=6585
* Implement this function by moving bits from glocalfileinfo.cDavid Zeuthen2008-02-211-4/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-02-21 David Zeuthen <davidz@redhat.com> * glocalfileinfo.c: (_g_local_file_info_get): * gcontenttype.c: (g_content_type_get_icon): Implement this function by moving bits from glocalfileinfo.c (g_content_type_get_description): Unalias before getting description (#517687) * gfile.c: (g_file_class_init), (g_file_query_filesystem_info_async), (g_file_query_filesystem_info_finish), (query_filesystem_info_data_free), (query_filesystem_info_async_thread), (g_file_real_query_filesystem_info_async), (g_file_real_query_filesystem_info_finish): * gfile.h: Implement async version of g_file_query_filesystem_info() * gfileinfo.h: Add new attributes for filesystem::use-preview * gio.symbols: Update * gthemedicon.c: (g_themed_icon_append_name): * gthemedicon.h: Add new new convenience function. * gunionvolumemonitor.c: (g_union_volume_monitor_dispose), (get_mounts), (get_volumes), (get_connected_drives), (get_volume_for_uuid), (get_mount_for_uuid), (g_union_volume_monitor_init), (populate_union_monitor), (g_volume_monitor_get), (_g_mount_get_for_mount_path), (g_volume_monitor_adopt_orphan_mount): * gvolumemonitor.c: * gvolumemonitor.h: Use recursive locks so it's safe for volume monitor implementations to call into the main volume monitor. Also separate object initialization and volume monitor initialization such that non-native volume monitors can properly adopt their mounts away. svn path=/trunk/; revision=6550
* Add new g_file_has_prefix that does the same as g_file_contains_file.Alexander Larsson2008-02-211-5/+8
| | | | | | | | | | | | | | | | | | | | | 2008-02-21 Alexander Larsson <alexl@redhat.com> * gfile.[ch]: * gio.symbols: Add new g_file_has_prefix that does the same as g_file_contains_file. Deprecate g_file_contains_file and add a macro that converts it to g_file_has_prefix. The reason for this change is that the contains_file() name seems to imply that this does more work than what it does, but its really only a name match (from #517086) * gdummyfile.c: * glocalfile.c: * tests/g-file.c: Update to match the above change. svn path=/trunk/; revision=6546
* Remove trailing coma in GMountMountFlags structSylvain Pasche2008-02-191-1/+1
| | | | | | | | | | 2008-02-18 Sylvain Pasche <sylvain.pasche@gmail.com> * gfile.h: Remove trailing coma in GMountMountFlags struct svn path=/trunk/; revision=6536