gFileSetDisplayName: gFileSetDisplayName

Description Usage Arguments Details Value Author(s)

View source: R/gioFuncs.R

Description

Renames file to the specified display name.

Usage

1
2
gFileSetDisplayName(object, display.name, cancellable = NULL, 
    .errwarn = TRUE)

Arguments

object

input GFile.

display.name

a string.

cancellable

optional GCancellable object, NULL to ignore.

.errwarn

Whether to issue a warning on error or fail silently

Details

The display name is converted from UTF8 to the correct encoding for the target filesystem if possible and the file is renamed to this.

If you want to implement a rename operation in the user interface the edit name (G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME) should be used as the initial value in the rename widget, and then the result after editing should be passed to gFileSetDisplayName.

On success the resulting converted filename is returned.

If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

Value

A list containing the following elements:

retval

[GFile] a GFile specifying what file was renamed to, or NULL if there was an error.

error

a GError, or NULL

Author(s)

Derived by RGtkGen from GTK+ documentation


RGtk2 documentation built on Oct. 14, 2021, 5:08 p.m.