readlinklist


Description:

[ CCode ( array_length = false , array_null_terminated = true ) ]
[ Version ( since = "1.0.77" ) ]
public string[] readlinklist (string path, string[] names) throws Error

readlink on multiple files

This call allows you to do a readlink operation on multiple files, where all files are in the directory path. names is the list of files from this directory.

On return you get a list of strings, with a one-to-one correspondence to the names list. Each string is the value of the symbolic link.

If the readlink(2) operation fails on any name, then the corresponding result string is the empty string "". However the whole operation is completed even if there were readlink(2) errors, and so you can call this function with names where you don't know if they are symbolic links already (albeit slightly less efficient).

This call is intended for programs that want to efficiently list a directory contents without making many round-trips.

Parameters:

this

A GuestfsSession object

names

an array of strings

Returns:

an array of returned strings, or NULL on error