Operations

3 THUNAR-VFS Library

Operations

# Synopsis

    #include <thunar-vfs/thunar-vfs.h>

    ThunarVfsJob*       thunar_vfs_listdir                  (ThunarVfsPath *path,
                                                             GError **error);
    ThunarVfsJob*       thunar_vfs_create_file              (ThunarVfsPath *path,
                                                             GError **error);
    ThunarVfsJob*       thunar_vfs_create_files             (GList *path_list,
                                                             GError **error);
    ThunarVfsJob*       thunar_vfs_copy_file                (ThunarVfsPath *source_path,
                                                             ThunarVfsPath *target_path,
                                                             GError **error);
    ThunarVfsJob*       thunar_vfs_copy_files               (GList *source_path_list,
                                                             GList *target_path_list,
                                                             GError **error);
    ThunarVfsJob*       thunar_vfs_link_file                (ThunarVfsPath *source_path,
                                                             ThunarVfsPath *target_path,
                                                             GError **error);
    ThunarVfsJob*       thunar_vfs_link_files               (GList *source_path_list,
                                                             GList *target_path_list,
                                                             GError **error);
    ThunarVfsJob*       thunar_vfs_move_file                (ThunarVfsPath *source_path,
                                                             ThunarVfsPath *target_path,
                                                             GError **error);
    ThunarVfsJob*       thunar_vfs_move_files               (GList *source_path_list,
                                                             GList *target_path_list,
                                                             GError **error);
    ThunarVfsJob*       thunar_vfs_unlink_file              (ThunarVfsPath *path,
                                                             GError **error);
    ThunarVfsJob*       thunar_vfs_unlink_files             (GList *path_list,
                                                             GError **error);
    ThunarVfsJob*       thunar_vfs_make_directory           (ThunarVfsPath *path,
                                                             GError **error);
    ThunarVfsJob*       thunar_vfs_make_directories         (GList *path_list,
                                                             GError **error);
    ThunarVfsJob*       thunar_vfs_change_mode              (ThunarVfsPath *path,
                                                             ThunarVfsFileMode dir_mask,
                                                             ThunarVfsFileMode dir_mode,
                                                             ThunarVfsFileMode file_mask,
                                                             ThunarVfsFileMode file_mode,
                                                             gboolean recursive,
                                                             GError **error);
    ThunarVfsJob*       thunar_vfs_change_group             (ThunarVfsPath *path,
                                                             ThunarVfsGroupId gid,
                                                             gboolean recursive,
                                                             GError **error);

## Description

## Details

### thunar_vfs_listdir ()

    ThunarVfsJob*       thunar_vfs_listdir                  (ThunarVfsPath *path,
                                                             GError **error);

Generates a `ThunarVfsJob`, which lists the contents of the folder at the specified `path`. If the job could not be launched for some reason, `NULL` will be returned and `error` will be set to point to a `GError` describing the cause. Otherwise the newly allocated `ThunarVfsJob` will be returned and the caller is responsible to call `g_object_unref()`.

Note, that the returned job is launched right away, so you don't need to call `thunar_vfs_job_launch()` on it.

`path` :

`error` :

Returns :

### thunar_vfs_create_file ()

    ThunarVfsJob*       thunar_vfs_create_file              (ThunarVfsPath *path,
                                                             GError **error);

Allocates a new `ThunarVfsJob`, which creates a new empty file at `path`.

The caller is responsible to free the returned job using `g_object_unref()` when no longer needed.

Note that the returned job is launched right away, so you don't need to call `thunar_vfs_job_launch()` on it.

`path` :

`error` :

Returns :

### thunar_vfs_create_files ()

    ThunarVfsJob*       thunar_vfs_create_files             (GList *path_list,
                                                             GError **error);

Allocates a new `ThunarVfsJob` which creates new empty files for all `ThunarVfsPath`s in `path_list`.

The caller is responsible to free the returned job using `g_object_unref()` when no longer needed.

Note that the returned job is launched right away, so you don't need to call `thunar_vfs_job_launch()` on it.

`path_list` :

`error` :

Returns :

### thunar_vfs_copy_file ()

    ThunarVfsJob*       thunar_vfs_copy_file                (ThunarVfsPath *source_path,
                                                             ThunarVfsPath *target_path,
                                                             GError **error);

Allocates a new `ThunarVfsTransferJob`, which copies the file from `source_path` to `target_path`. That said, the file or directory located at `source_path` will be placed at `target_path`, NOT INTO `target_path`.

The caller is responsible to free the returned job using `g_object_unref()` when no longer needed.

Note, that the returned job is launched right away, so you don't need to call `thunar_vfs_job_launch()` on it.

`source_path` :

`target_path` :

`error` :

Returns :

### thunar_vfs_copy_files ()

    ThunarVfsJob*       thunar_vfs_copy_files               (GList *source_path_list,
                                                             GList *target_path_list,
                                                             GError **error);

Similar to `thunar_vfs_copy_file()`, but takes a bunch of files. The `source_path_list` and `target_path_list` must be of the same size.

Note, that the returned job is launched right away, so you don't need to call `thunar_vfs_job_launch()` on it. The caller is responsible to free the returned object using `g_object_unref()` when no longer needed.

`source_path_list` :

`target_path_list` :

`error` :

Returns :

### thunar_vfs_link_file ()

    ThunarVfsJob*       thunar_vfs_link_file                (ThunarVfsPath *source_path,
                                                             ThunarVfsPath *target_path,
                                                             GError **error);

Allocates a new `ThunarVfsJob`, which creates a symbolic link from `source_path` to `target_path`.

If `source_path` and `target_path` refer to the same file, a new unique target filename will be choosen automatically.

The caller is responsible to free the returned job using `g_object_unref()` when no longer needed.

Note, that the returned job is launched right away, so you don't need to call `thunar_vfs_job_launch()` on it.

`source_path` :

`target_path` :

`error` :

Returns :

### thunar_vfs_link_files ()

    ThunarVfsJob*       thunar_vfs_link_files               (GList *source_path_list,
                                                             GList *target_path_list,
                                                             GError **error);

Like `thunar_vfs_link_file()`, but works on path lists, rather than a single path. The length of the `source_path_list` and `target_path_list` must match, otherwise the behaviour is undefined, but its likely to crash the application.

Right now links can only be created from local files to local files (with path scheme `THUNAR_VFS_PATH_SCHEME_FILE`).

The caller is responsible to free the returned job using `g_object_unref()` when no longer needed.

Note, that the returned job is launched right away, so you don't need to call `thunar_vfs_job_launch()` on it.

`source_path_list` :

`target_path_list` :

`error` :

Returns :

### thunar_vfs_move_file ()

    ThunarVfsJob*       thunar_vfs_move_file                (ThunarVfsPath *source_path,
                                                             ThunarVfsPath *target_path,
                                                             GError **error);

Allocates a new `ThunarVfsTransferJob`, which moves the file from `source_path` to `target_path`. That said, the file or directory located at `source_path` will be placed at `target_path`, NOT INTO `target_path`.

The caller is responsible to free the returned job using `g_object_unref()` when no longer needed.

Note, that the returned job is launched right away, so you don't need to call `thunar_vfs_job_launch()` on it.

`source_path` :

`target_path` :

`error` :

Returns :

### thunar_vfs_move_files ()

    ThunarVfsJob*       thunar_vfs_move_files               (GList *source_path_list,
                                                             GList *target_path_list,
                                                             GError **error);

Similar to `thunar_vfs_move_file()`, but takes a bunch of files. The `source_path_list` and `target_path_list` must be of the same size.

Note, that the returned job is launched right away, so you don't need to call `thunar_vfs_job_launch()` on it. The caller is responsible to free the returned object using `g_object_unref()` when no longer needed.

`source_path_list` :

`target_path_list` :

`error` :

Returns :

### thunar_vfs_unlink_file ()

    ThunarVfsJob*       thunar_vfs_unlink_file              (ThunarVfsPath *path,
                                                             GError **error);

Simple wrapper to `thunar_vfs_unlink_files()`, which takes only a single path.

Note, that the returned job is launched right away, so you don't need to call `thunar_vfs_job_launch()` on it. The caller is responsible to free the returned object using `g_object_unref()` when no longer needed.

`path` :

`error` :

Returns :

### thunar_vfs_unlink_files ()

    ThunarVfsJob*       thunar_vfs_unlink_files             (GList *path_list,
                                                             GError **error);

Allocates a new `ThunarVfsJob` which recursively unlinks all files referenced by the `path_list`. If the job cannot be launched for some reason, `NULL` will be returned and `error` will be set to point to a `GError` describing the cause. Else, the newly allocated `ThunarVfsJob` will be returned, and the caller is responsible to free it using `g_object_unref()` when no longer needed.

Note, that the returned job is launched right away, so you don't need to call `thunar_vfs_job_launch()` on it.

`path_list` :

`error` :

Returns :

### thunar_vfs_make_directory ()

    ThunarVfsJob*       thunar_vfs_make_directory           (ThunarVfsPath *path,
                                                             GError **error);

Simple wrapper for `thunar_vfs_make_directories()`.

`path` :

`error` :

Returns :

### thunar_vfs_make_directories ()

    ThunarVfsJob*       thunar_vfs_make_directories         (GList *path_list,
                                                             GError **error);

Allocates a new `ThunarVfsJob` to create new directories at all `ThunarVfsPath`s specified in `path_list`. Returns `NULL` if the job could not be launched for some reason, and `error` will be set to point to a `GError` describing the cause. Otherwise the job will be returned and the caller is responsible to free the returned object using `g_object_unref()` when no longer needed.

Note, that the returned job is launched right away, so you don't need to call `thunar_vfs_job_launch()` on it.

`path_list` :

`error` :

Returns :

### thunar_vfs_change_mode ()

    ThunarVfsJob*       thunar_vfs_change_mode              (ThunarVfsPath *path,
                                                             ThunarVfsFileMode dir_mask,
                                                             ThunarVfsFileMode dir_mode,
                                                             ThunarVfsFileMode file_mask,
                                                             ThunarVfsFileMode file_mode,
                                                             gboolean recursive,
                                                             GError **error);

The caller is responsible to free the returned job using `g_object_unref()` when no longer needed.

Note, that the returned job is launched right away, so you don't need to call `thunar_vfs_job_launch()` on it.

`path` :

`dir_mask` :

`dir_mode` :

`file_mask` :

`file_mode` :

`recursive` :

`error` :

Returns :

### thunar_vfs_change_group ()

    ThunarVfsJob*       thunar_vfs_change_group             (ThunarVfsPath *path,
                                                             ThunarVfsGroupId gid,
                                                             gboolean recursive,
                                                             GError **error);

The caller is responsible to free the returned job using `g_object_unref()` when no longer needed.

Note, that the returned job is launched right away, so you don't need to call `thunar_vfs_job_launch()` on it.

`path` :

`gid` :

`recursive` :

`error` :

Returns :