GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
DtDtsFileToAttributeValue(library call) DtDtsFileToAttributeValue(library call)

DtDtsFileToAttributeValue — get a specified attribute value for a file

#include &<Dt/Dts.h>
char *DtDtsFileToAttributeValue(
const char *filepath,
const char *attr_name);

The DtDtsFileToAttributeValue function returns a data attribute value for the specified file.

The filepath argument is the pathname of the file.

The attr_name argument is a pointer to an attribute name string.

Upon successful completion, the DtDtsFileToAttributeValue function returns a pointer to a data attribute value string, or NULL if no value could be determined.

The application should use the DtDtsFreeAttributeValue(3) function to release the memory for the returned value.

The following takes a list of files as arguments and determines the description of the data type for each file:

#include &<Dt/Dts.h>
#define ATTRIBUTE       "DESCRIPTION"
main (int argc, char **argv)
{

char *attribute;
/* load data types database */
DtDtsLoadDataTypes();
argv++;
while (*argv) {
/* get attribute for file */
attribute = DtDtsFileToAttributeValue(*argv, ATTRIBUTE);
if (attribute)
printf("%s: %s0, *argv, attribute);
argv++;
}
DtDtsRelease();
exit(0); }

Dt/Dts.h, DtDtsLoadDataTypes(3), DtDtsRelease(3), DtDtsFreeAttributeValue(3).


Search for    or go to Top of page |  Section l |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.