---
name: "NJB_Get_Datafile_Tag"
section: "3"
platform: "linux"
package: "libnjb1-doc"
version: "1.1-2"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/NJB_Get_Datafile_Tag"
---

# NJB\_Get\_Datafile\_Tag(3)

List the data files stored on the NJB.

## NAME

NJB\_Get\_Datafile\_Tag, NJB\_Reset\_Get\_Datafile\_Tag - List the data files stored on the NJB.

## LIBRARY

libnjb

## SYNOPSIS

\#include \<libnjb.h\>

extern int njb\_error

void NJB\_Reset\_Get\_Datafile\_Tag (njb\_t **\*njb**)

datafile\_t \*NJB\_Get\_Datafile\_Tag (njb\_t **\*njb**)

## DESCRIPTION

This function is used to obtain a list of data files stored on the NJB. Each call to NJB\_Get\_Datafile\_Tag returns a datafile\_t object that contains the datafile tag.  It is the program's responsibility to free this memory using the **datafile\_destroy**(3) function when the tag is no longer needed.  Tags are returned one at a time, in no particular order.  NJB\_Reset\_Get\_Datafile\_Tag resets the fetch list to the beginning.

When all the data file tags have been returned, a NULL pointer is returned and  **njb\_error** is set to EO\_NOMEM.

## RETURN VALUES

NJB\_Get\_Datafile\_Tag returns a datafile\_t object on success.  If an  error occurs, a NULL pointer is returned and **njb\_error** is set accordingly.

- EO\_BADDATA

  An invalid datafile tag was received.

- EO\_BADSTATUS

  The NJB returned a non-zero status.

- EO\_EOM

  No more data file tags remain.

- EO\_NOMEM

  There was not enough memory available to create the datafile\_t object.

- EO\_RDSHORT

  Fewer bytes than expected were sent by the NJB on the bulk data pipe.

- EO\_USBBLK

  An I/O error occurred on the bulk data pipe.

- EO\_USBCTL

  An I/O error occurred on the control pipe.

## SEE ALSO

datafile\_destroy(3)
