*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->HP-UX 11i man pages -> DtDtsDataToDataType (3)              
Title
Content
Arch
Section
 

e(3)

Contents


 DtDtsDataToDataType(library call)         DtDtsDataToDataType(library call)




 NAME    [Toc]    [Back]
      DtDtsDataToDataType - get the data type for a set of data

 SYNOPSIS    [Toc]    [Back]
      #include <Dt/Dts.h>
      char *DtDtsDataToDataType(
      const char *filepath,
      const void *buffer,
      const int size,
      const struct stat *stat_buff,
      const char *link_path,
      const struct stat *link_stat_buff,
      const char *opt_name);

 DESCRIPTION    [Toc]    [Back]
      The DtDtsDataToDataType function determines the data type of a set of
      data, based on the information given in the non- NULL pointer
      arguments to the function.  The function gathers any additional
      information, if it is needed, to compensate for the NULL arguments.
      For example, if the filepath argument is given, but the stat_buff
      argument is NULL and a stat_buff value is required to determine the
      data type, DtDtsDataToDataType calls the stat(2) function to obtain
      the information.

      The filepath argument is the pathname of a file.

      The buffer argument is a pointer to the buffer of the data to be
      typed.

      The size argument is the size of the buffer in bytes.

      The stat_buff argument is the buffer returned from a stat(2) or
      fstat(3) call for use in typing.

      The link_path argument is the pathname of the target file pointed to
      by a symbolic link.

      The link_stat_buff argument is the buffer returned from an lstat(2)
      call for use in typing.

      The opt_name argument can be used to specify a name to be associated
      with the buffer.  If the opt_name argument is not NULL, it is used as
      a pseudo file name in typing; otherwise, certain attributes may be
      returned as NULL because the filename components could not be
      determined.

 RETURN VALUE    [Toc]    [Back]
      Upon successful completion, the DtDtsDataToDataType function returns a
      pointer to a data type string, or NULL if no value could be
      determined.




                                    - 1 -       Formatted:  January 24, 2005






 DtDtsDataToDataType(library call)         DtDtsDataToDataType(library call)




 APPLICATION USAGE    [Toc]    [Back]
      The DtDtsDataToDataType function is generally used by applications
      such as file managers to improve performance.  Typical applications
      should probably use DtDtsFileToDataTypeDtDtsBuffer* functions assume that the buffer is readable and
      writable by the user, group and other file classes and select a type
      accordingly.  An application requiring a type based on read-only
      permissions should use DtDtsDataToDataType with a stat_buff value
      created for this purpose: all fields should NULL except for the
      st_mode field, which should be set to:

      S_IFREG | S_IROTH | S_IRGRP | S_IRUSR

 SEE ALSO    [Toc]    [Back]
      Dt/Dts.h, DtDtsLoadDataTypes(3), DtDtsFileToDataType(3),
      DtDtsBufferToDataType(3), fstat(3), lstat(2), stat(2).


                                    - 2 -       Formatted:  January 24, 2005
[ Back ]
      
      
 Similar pages
Name OS Title
DtDtsSetDataType HP-UX set the data type of a directory
vector Linux Vector data type for Tcl
DtDtsDataTypeToAttributeValue HP-UX get an attribute value for a specified data type
DtDtsFileToDataType HP-UX get a data type for a file
XmTab HP-UX Data type for a tab stop
XmTabList HP-UX Data type for a tab list
form_field_validation FreeBSD data type validation for fields
DtDtsDataTypeIsAction HP-UX determine if the data type is an action
XmString Tru64 Data type for a compound string
field_arg OpenBSD data type validation for fields
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service