---
name: "gd_hidden"
section: "3"
platform: "linux"
package: "libgetdata-doc"
version: "0.11.0-15"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/gd_hidden"
---

# gd\_hidden(3)

check whether a Dirfile entry is hidden or not

## NAME

gd\_hidden — check whether a Dirfile entry is hidden or not

## SYNOPSIS

**#include \<getdata.h\>**

**int gd\_hidden(const DIRFILE \****dirfile***, const char** **\****entry\_name***);**

## DESCRIPTION

The **gd\_hidden**() function queries a [dirfile(5)](/dirfile/5.md) database specified by *dirfile* to determine whether the field or alias called *entry\_name* is hidden or not.  This information is also available in the entry object proved by [**gd\_entry**(3)](/gd_entry/3.md).

By default, a hidden entry does not appear in the lists returned by the functions [**gd\_match\_entries**(3)](/gd_match_entries/3.md), [**gd\_entry\_list**(3)](/gd_entry_list/3.md) [**gd\_constants**(3)](/gd_constants/3.md), or [**gd\_strings**(3)](/gd_strings/3.md), including the special-case versions of [**gd\_entry\_list**(3)](/gd_entry_list/3.md) such as [**gd\_field\_list**(3)](/gd_field_list/3.md). These omissions are also reflected in the counts returned by the corresponding field counting function [**gd\_nentries**(3)](/gd_nentries/3.md) and it's special-case versions ([**gd\_nfields**(3)](/gd_nfields/3.md), &c.).

## RETURN VALUE

Upon successful completion, **gd\_hidden**() returns one if the field or alias is hidden, or zero if the entry is not hidden.

On error, it returns a negative-valued error code.  (As a result, the caller checking simply whether the return value of this function is non-zero is usually an error.)  Possible error codes are:\
  .TP 8 **GD\_E\_BAD\_CODE** The field specified by *field\_code* was not found in the database.\
  .TP 8 **GD\_E\_BAD\_DIRFILE** The supplied dirfile was invalid.

The error code is also stored in the **DIRFILE** object and may be retrieved after this function returns by calling [**gd\_error**(3)](/gd_error/3.md). A descriptive error string for the error may be obtained by calling [**gd\_error\_string**(3)](/gd_error_string/3.md).

## HISTORY

The **gd\_hidden**() function appeared in GetData-0.8.0.

In GetData-0.10.0, the error return from this function changed from -1 to a negative-valued error code.

## SEE ALSO

[**gd\_entry**(3)](/gd_entry/3.md), [**gd\_field\_list**(3)](/gd_field_list/3.md), [**gd\_hide**(3)](/gd_hide/3.md), [**gd\_nfields**(3)](/gd_nfields/3.md), [**gd\_open**(3)](/gd_open/3.md), [**gd\_unhide**(3)](/gd_unhide/3.md), [dirfile(5)](/dirfile/5.md)
