GLib.lstat
Description: Reference for GLib.lstat

### Function

# GLiblstat

since: 2.6

#### Declaration [src]

    int
    g_lstat (
      const gchar* filename,
      GStatBuf* buf
    )

#### Description [src]

A wrapper for the POSIX `lstat()` function. The `lstat()` function is like `stat()` except that in the case of symbolic links, it returns information about the symbolic link itself and not the file that it refers to. If the system does not support symbolic links `g_lstat()` is identical to g_stat().

See your C library manual for more details about lstat().

Available since: 2.6

#### Parameters

`filename`

  Type: `const gchar*`

  A pathname in the GLib file name encoding (UTF-8 on Windows).

  The data is owned by the caller of the function.
  The value is a platform-native string, using the preferred OS encoding on Unix and UTF-8 on Windows.

`buf`

  Type: `GStatBuf`

  A pointer to a stat struct, which will be filled with the file information.

  The data is owned by the caller of the function.

#### Return value

Type: `int`

0 if the information was successfully retrieved, -1 if an error occurred.