.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "TIFFCREATEDIRECTORY" "3tiff" "Sep 08, 2023" "4.6" "LibTIFF" .SH NAME TIFFCreateDirectory \- routines to create a directory and retrieve information about directories .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C #include .ft P .fi .UNINDENT .UNINDENT .INDENT 0.0 .TP .B int TIFFCreateDirectory(TIFF *tif) .UNINDENT .INDENT 0.0 .TP .B int TIFFFreeDirectory(TIFF *tif) .UNINDENT .INDENT 0.0 .TP .B int TIFFUnlinkDirectory(TIFF *tif, tdir_t dirn) .UNINDENT .SH DESCRIPTION .sp The following routines create or release a directory. .sp \fI\%TIFFCreateDirectory()\fP setup for a directory in a open TIFF file. The newly created directory will not exist on the file till \fI\%TIFFWriteDirectory()\fP, \fI\%TIFFCheckpointDirectory()\fP, \fI\%TIFFFlush()\fP or \fI\%TIFFClose()\fP is called. \fI\%TIFFWriteDirectory()\fP also creates a new directory, frees the \fB*tif\fP structure and sets up a new one. .sp \fI\%TIFFFreeDirectory()\fP releases allocated storage associated with a directory, especially custom\-fields. However, the main part of the directory is not touched. Routine \fI\%TIFFCleanup()\fP calls \fI\%TIFFFreeDirectory()\fP to release the directory part of the \fItif\fP structure. .sp \fI\%TIFFUnlinkDirectory()\fP unlink the specified directory from the directory chain. The parameter \fIdirn\fP specifies the subfile/directory as an integer number, with the first directory numbered one (1). This is different to \fI\%TIFFSetDirectory()\fP or \fI\%TIFFCurrentDirectory()\fP where the first directory starts with zero (0). .sp Directory query functions \fI\%TIFFCurrentDirectory()\fP, \fI\%TIFFCurrentDirOffset()\fP, \fI\%TIFFLastDirectory()\fP and \fI\%TIFFNumberOfDirectories()\fP retrieve information about directories in an open TIFF file. Be aware that until a directory is not written to file AND read back, the query functions won’t retrieve the correct information! .SH NOTES .sp Be aware: .INDENT 0.0 .IP \(bu 2 that until a directory is not written to file AND read back, the query functions won’t retrieve the correct information! .IP \(bu 2 that the newly created directory will not exist on the file till \fI\%TIFFWriteDirectory()\fP, \fI\%TIFFCheckpointDirectory()\fP, \fI\%TIFFFlush()\fP or \fI\%TIFFClose()\fP has been called. .IP \(bu 2 that \fI\%TIFFCreateDirectory()\fP and \fI\%TIFFWriteDirectory()\fP create a new directory, free the \fB*tif\fP structure and set up a new one. .IP \(bu 2 that unlike \fI\%TIFFWriteDirectory()\fP, \fI\%TIFFCheckpointDirectory()\fP does not free up the directory data structures in memory. .UNINDENT .SH DIAGNOSTICS .sp All error messages are directed to the \fI\%TIFFErrorExtR()\fP routine. Likewise, warning messages are directed to the \fI\%TIFFWarningExtR()\fP routine. .SH SEE ALSO .sp \fI\%libtiff\fP (3tiff), \fI\%TIFFCustomDirectory\fP (3tiff), \fI\%TIFFquery\fP (3tiff), \fI\%TIFFSetDirectory\fP (3tiff), \fI\%TIFFWriteDirectory\fP (3tiff) .SH AUTHOR LibTIFF contributors .SH COPYRIGHT 1988-2022, LibTIFF contributors .\" Generated by docutils manpage writer. .