EVOLUTION-MANAGER
Edit File: cpl__vsi_8h.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.5"/> <title>OGR: cpl_vsi.h File Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">OGR </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.5 --> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="dir_651562d8bf6cfd3e81eff5b570d7df50.html">port</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#func-members">Functions</a> </div> <div class="headertitle"> <div class="title">cpl_vsi.h File Reference</div> </div> </div><!--header--> <div class="contents"> <div class="textblock"><code>#include "<a class="el" href="cpl__port_8h_source.html">cpl_port.h</a>"</code><br/> <code>#include <unistd.h></code><br/> <code>#include <sys/stat.h></code><br/> </div> <p><a href="cpl__vsi_8h_source.html">Go to the source code of this file.</a></p> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> Functions</h2></td></tr> <tr class="memitem:ad487ad46f2841815f331292051192d5f"><td class="memItemLeft" align="right" valign="top">VSILFILE * </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__vsi_8h.html#ad487ad46f2841815f331292051192d5f">VSIFOpenL</a> (const char *, const char *)</td></tr> <tr class="memdesc:ad487ad46f2841815f331292051192d5f"><td class="mdescLeft"> </td><td class="mdescRight">Open file. <a href="#ad487ad46f2841815f331292051192d5f">More...</a><br/></td></tr> <tr class="separator:ad487ad46f2841815f331292051192d5f"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a82fe6612261c1948eee388e75b7d6db7"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__vsi_8h.html#a82fe6612261c1948eee388e75b7d6db7">VSIFCloseL</a> (VSILFILE *)</td></tr> <tr class="memdesc:a82fe6612261c1948eee388e75b7d6db7"><td class="mdescLeft"> </td><td class="mdescRight">Close file. <a href="#a82fe6612261c1948eee388e75b7d6db7">More...</a><br/></td></tr> <tr class="separator:a82fe6612261c1948eee388e75b7d6db7"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:aeac1c2bc2d4dac71e504f62be5c564f3"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__vsi_8h.html#aeac1c2bc2d4dac71e504f62be5c564f3">VSIFSeekL</a> (VSILFILE *, vsi_l_offset, int)</td></tr> <tr class="memdesc:aeac1c2bc2d4dac71e504f62be5c564f3"><td class="mdescLeft"> </td><td class="mdescRight">Seek to requested offset. <a href="#aeac1c2bc2d4dac71e504f62be5c564f3">More...</a><br/></td></tr> <tr class="separator:aeac1c2bc2d4dac71e504f62be5c564f3"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a25fe184bb565bbda49965102dbe0ca15"><td class="memItemLeft" align="right" valign="top">vsi_l_offset </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__vsi_8h.html#a25fe184bb565bbda49965102dbe0ca15">VSIFTellL</a> (VSILFILE *)</td></tr> <tr class="memdesc:a25fe184bb565bbda49965102dbe0ca15"><td class="mdescLeft"> </td><td class="mdescRight">Tell current file offset. <a href="#a25fe184bb565bbda49965102dbe0ca15">More...</a><br/></td></tr> <tr class="separator:a25fe184bb565bbda49965102dbe0ca15"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:aaddb197f5fb0d431a565b89281d42d93"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__vsi_8h.html#aaddb197f5fb0d431a565b89281d42d93">VSIFReadL</a> (void *, size_t, size_t, VSILFILE *)</td></tr> <tr class="memdesc:aaddb197f5fb0d431a565b89281d42d93"><td class="mdescLeft"> </td><td class="mdescRight">Read bytes from file. <a href="#aaddb197f5fb0d431a565b89281d42d93">More...</a><br/></td></tr> <tr class="separator:aaddb197f5fb0d431a565b89281d42d93"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:aaeb325d9dcb43c16a3fa1592ed7c1d2b"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__vsi_8h.html#aaeb325d9dcb43c16a3fa1592ed7c1d2b">VSIFReadMultiRangeL</a> (int nRanges, void **ppData, const vsi_l_offset *panOffsets, const size_t *panSizes, VSILFILE *)</td></tr> <tr class="memdesc:aaeb325d9dcb43c16a3fa1592ed7c1d2b"><td class="mdescLeft"> </td><td class="mdescRight">Read several ranges of bytes from file. <a href="#aaeb325d9dcb43c16a3fa1592ed7c1d2b">More...</a><br/></td></tr> <tr class="separator:aaeb325d9dcb43c16a3fa1592ed7c1d2b"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a2a382b55d461f4979f523e8c6e257ada"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__vsi_8h.html#a2a382b55d461f4979f523e8c6e257ada">VSIFWriteL</a> (const void *, size_t, size_t, VSILFILE *)</td></tr> <tr class="memdesc:a2a382b55d461f4979f523e8c6e257ada"><td class="mdescLeft"> </td><td class="mdescRight">Write bytes to file. <a href="#a2a382b55d461f4979f523e8c6e257ada">More...</a><br/></td></tr> <tr class="separator:a2a382b55d461f4979f523e8c6e257ada"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ab72b69150d9dd7adb6e756196867a9b2"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__vsi_8h.html#ab72b69150d9dd7adb6e756196867a9b2">VSIFEofL</a> (VSILFILE *)</td></tr> <tr class="memdesc:ab72b69150d9dd7adb6e756196867a9b2"><td class="mdescLeft"> </td><td class="mdescRight">Test for end of file. <a href="#ab72b69150d9dd7adb6e756196867a9b2">More...</a><br/></td></tr> <tr class="separator:ab72b69150d9dd7adb6e756196867a9b2"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a3363cbf28c47b5dcadaf0812dd50e6b9"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__vsi_8h.html#a3363cbf28c47b5dcadaf0812dd50e6b9">VSIFTruncateL</a> (VSILFILE *, vsi_l_offset)</td></tr> <tr class="memdesc:a3363cbf28c47b5dcadaf0812dd50e6b9"><td class="mdescLeft"> </td><td class="mdescRight">Truncate/expand the file to the specified size. <a href="#a3363cbf28c47b5dcadaf0812dd50e6b9">More...</a><br/></td></tr> <tr class="separator:a3363cbf28c47b5dcadaf0812dd50e6b9"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a224b7e3c50275ae1924e89185df5494d"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__vsi_8h.html#a224b7e3c50275ae1924e89185df5494d">VSIFFlushL</a> (VSILFILE *)</td></tr> <tr class="memdesc:a224b7e3c50275ae1924e89185df5494d"><td class="mdescLeft"> </td><td class="mdescRight">Flush pending writes to disk. <a href="#a224b7e3c50275ae1924e89185df5494d">More...</a><br/></td></tr> <tr class="separator:a224b7e3c50275ae1924e89185df5494d"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ad19d593846fa567ada334b12a7bf8a3b"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__vsi_8h.html#ad19d593846fa567ada334b12a7bf8a3b">VSIFPrintfL</a> (VSILFILE *, const char *,...)</td></tr> <tr class="memdesc:ad19d593846fa567ada334b12a7bf8a3b"><td class="mdescLeft"> </td><td class="mdescRight">Formatted write to file. <a href="#ad19d593846fa567ada334b12a7bf8a3b">More...</a><br/></td></tr> <tr class="separator:ad19d593846fa567ada334b12a7bf8a3b"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a6c5ab5def482f0efc439162b2896b4ea"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__vsi_8h.html#a6c5ab5def482f0efc439162b2896b4ea">VSIIngestFile</a> (VSILFILE *fp, const char *pszFilename, GByte **ppabyRet, vsi_l_offset *pnSize, GIntBig nMaxSize)</td></tr> <tr class="memdesc:a6c5ab5def482f0efc439162b2896b4ea"><td class="mdescLeft"> </td><td class="mdescRight">Ingest a file into memory. <a href="#a6c5ab5def482f0efc439162b2896b4ea">More...</a><br/></td></tr> <tr class="separator:a6c5ab5def482f0efc439162b2896b4ea"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ac92fbd5e6fc143b026001b32c4c19ed1"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__vsi_8h.html#ac92fbd5e6fc143b026001b32c4c19ed1">VSIStatL</a> (const char *, VSIStatBufL *)</td></tr> <tr class="memdesc:ac92fbd5e6fc143b026001b32c4c19ed1"><td class="mdescLeft"> </td><td class="mdescRight">Get filesystem object info. <a href="#ac92fbd5e6fc143b026001b32c4c19ed1">More...</a><br/></td></tr> <tr class="separator:ac92fbd5e6fc143b026001b32c4c19ed1"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ad1a691db1ba2f43add25a5c0d6498da6"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__vsi_8h.html#ad1a691db1ba2f43add25a5c0d6498da6">VSIStatExL</a> (const char *pszFilename, VSIStatBufL *psStatBuf, int nFlags)</td></tr> <tr class="memdesc:ad1a691db1ba2f43add25a5c0d6498da6"><td class="mdescLeft"> </td><td class="mdescRight">Get filesystem object info. <a href="#ad1a691db1ba2f43add25a5c0d6498da6">More...</a><br/></td></tr> <tr class="separator:ad1a691db1ba2f43add25a5c0d6498da6"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a36737f0cb2949ba2f7bbf23cc6592a04"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__vsi_8h.html#a36737f0cb2949ba2f7bbf23cc6592a04">VSIIsCaseSensitiveFS</a> (const char *pszFilename)</td></tr> <tr class="memdesc:a36737f0cb2949ba2f7bbf23cc6592a04"><td class="mdescLeft"> </td><td class="mdescRight">Returns if the filenames of the filesystem are case sensitive. <a href="#a36737f0cb2949ba2f7bbf23cc6592a04">More...</a><br/></td></tr> <tr class="separator:a36737f0cb2949ba2f7bbf23cc6592a04"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a41fd7388a7491b3430d0abe961dada82"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__vsi_8h.html#a41fd7388a7491b3430d0abe961dada82">VSIFGetNativeFileDescriptorL</a> (VSILFILE *)</td></tr> <tr class="memdesc:a41fd7388a7491b3430d0abe961dada82"><td class="mdescLeft"> </td><td class="mdescRight">Returns the "native" file descriptor for the virtual handle. <a href="#a41fd7388a7491b3430d0abe961dada82">More...</a><br/></td></tr> <tr class="separator:a41fd7388a7491b3430d0abe961dada82"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a9b88331b0be4f7f2bd43e7b830af7038"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__vsi_8h.html#a9b88331b0be4f7f2bd43e7b830af7038">VSIMalloc2</a> (size_t nSize1, size_t nSize2)</td></tr> <tr class="separator:a9b88331b0be4f7f2bd43e7b830af7038"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a644254757e7d9ec23df256d34fff565d"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__vsi_8h.html#a644254757e7d9ec23df256d34fff565d">VSIMalloc3</a> (size_t nSize1, size_t nSize2, size_t nSize3)</td></tr> <tr class="separator:a644254757e7d9ec23df256d34fff565d"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a6158d73485d6cf92c75b38e7f26d00c3"><td class="memItemLeft" align="right" valign="top">char ** </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__vsi_8h.html#a6158d73485d6cf92c75b38e7f26d00c3">VSIReadDir</a> (const char *)</td></tr> <tr class="memdesc:a6158d73485d6cf92c75b38e7f26d00c3"><td class="mdescLeft"> </td><td class="mdescRight">Read names in a directory. <a href="#a6158d73485d6cf92c75b38e7f26d00c3">More...</a><br/></td></tr> <tr class="separator:a6158d73485d6cf92c75b38e7f26d00c3"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a03c473cd78f2dffabf709245a928e6c7"><td class="memItemLeft" align="right" valign="top">char ** </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__vsi_8h.html#a03c473cd78f2dffabf709245a928e6c7">VSIReadDirRecursive</a> (const char *pszPath)</td></tr> <tr class="memdesc:a03c473cd78f2dffabf709245a928e6c7"><td class="mdescLeft"> </td><td class="mdescRight">Read names in a directory recursively. <a href="#a03c473cd78f2dffabf709245a928e6c7">More...</a><br/></td></tr> <tr class="separator:a03c473cd78f2dffabf709245a928e6c7"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:aef0a5243bbc47cf9645a135d0c7d26df"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__vsi_8h.html#aef0a5243bbc47cf9645a135d0c7d26df">VSIMkdir</a> (const char *pathname, long mode)</td></tr> <tr class="memdesc:aef0a5243bbc47cf9645a135d0c7d26df"><td class="mdescLeft"> </td><td class="mdescRight">Create a directory. <a href="#aef0a5243bbc47cf9645a135d0c7d26df">More...</a><br/></td></tr> <tr class="separator:aef0a5243bbc47cf9645a135d0c7d26df"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a763cceaa0966f37b71a0185c92bb3ad8"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__vsi_8h.html#a763cceaa0966f37b71a0185c92bb3ad8">VSIRmdir</a> (const char *pathname)</td></tr> <tr class="memdesc:a763cceaa0966f37b71a0185c92bb3ad8"><td class="mdescLeft"> </td><td class="mdescRight">Delete a directory. <a href="#a763cceaa0966f37b71a0185c92bb3ad8">More...</a><br/></td></tr> <tr class="separator:a763cceaa0966f37b71a0185c92bb3ad8"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a69dad1bd6f1af9935c1523db0c6c212f"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__vsi_8h.html#a69dad1bd6f1af9935c1523db0c6c212f">VSIUnlink</a> (const char *pathname)</td></tr> <tr class="memdesc:a69dad1bd6f1af9935c1523db0c6c212f"><td class="mdescLeft"> </td><td class="mdescRight">Delete a file. <a href="#a69dad1bd6f1af9935c1523db0c6c212f">More...</a><br/></td></tr> <tr class="separator:a69dad1bd6f1af9935c1523db0c6c212f"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a26cae93b5a32e11bef9ec7c118f8cca4"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__vsi_8h.html#a26cae93b5a32e11bef9ec7c118f8cca4">VSIRename</a> (const char *oldpath, const char *newpath)</td></tr> <tr class="memdesc:a26cae93b5a32e11bef9ec7c118f8cca4"><td class="mdescLeft"> </td><td class="mdescRight">Rename a file. <a href="#a26cae93b5a32e11bef9ec7c118f8cca4">More...</a><br/></td></tr> <tr class="separator:a26cae93b5a32e11bef9ec7c118f8cca4"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a66e2e6f093fd42f8a941b962d4c8a19e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__vsi_8h.html#a66e2e6f093fd42f8a941b962d4c8a19e">VSIInstallMemFileHandler</a> (void)</td></tr> <tr class="memdesc:a66e2e6f093fd42f8a941b962d4c8a19e"><td class="mdescLeft"> </td><td class="mdescRight">Install "memory" file system handler. <a href="#a66e2e6f093fd42f8a941b962d4c8a19e">More...</a><br/></td></tr> <tr class="separator:a66e2e6f093fd42f8a941b962d4c8a19e"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:abaee4232440e012b4b9920934fc571cc"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__vsi_8h.html#abaee4232440e012b4b9920934fc571cc">VSIInstallSubFileHandler</a> (void)</td></tr> <tr class="separator:abaee4232440e012b4b9920934fc571cc"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a4f791960f2d86713d16e99e9c0c36258"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__vsi_8h.html#a4f791960f2d86713d16e99e9c0c36258">VSIInstallCurlFileHandler</a> (void)</td></tr> <tr class="memdesc:a4f791960f2d86713d16e99e9c0c36258"><td class="mdescLeft"> </td><td class="mdescRight">Install /vsicurl/ HTTP/FTP file system handler (requires libcurl) <a href="#a4f791960f2d86713d16e99e9c0c36258">More...</a><br/></td></tr> <tr class="separator:a4f791960f2d86713d16e99e9c0c36258"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ab187e6713f07be9756c22c58b782642d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__vsi_8h.html#ab187e6713f07be9756c22c58b782642d">VSIInstallCurlStreamingFileHandler</a> (void)</td></tr> <tr class="memdesc:ab187e6713f07be9756c22c58b782642d"><td class="mdescLeft"> </td><td class="mdescRight">Install /vsicurl_streaming/ HTTP/FTP file system handler (requires libcurl) <a href="#ab187e6713f07be9756c22c58b782642d">More...</a><br/></td></tr> <tr class="separator:ab187e6713f07be9756c22c58b782642d"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a3cde09f204df6f417653b7af4761178e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__vsi_8h.html#a3cde09f204df6f417653b7af4761178e">VSIInstallGZipFileHandler</a> (void)</td></tr> <tr class="memdesc:a3cde09f204df6f417653b7af4761178e"><td class="mdescLeft"> </td><td class="mdescRight">Install GZip file system handler. <a href="#a3cde09f204df6f417653b7af4761178e">More...</a><br/></td></tr> <tr class="separator:a3cde09f204df6f417653b7af4761178e"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a884fac3cd6be2c09deb807e959d78b3a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__vsi_8h.html#a884fac3cd6be2c09deb807e959d78b3a">VSIInstallZipFileHandler</a> (void)</td></tr> <tr class="memdesc:a884fac3cd6be2c09deb807e959d78b3a"><td class="mdescLeft"> </td><td class="mdescRight">Install ZIP file system handler. <a href="#a884fac3cd6be2c09deb807e959d78b3a">More...</a><br/></td></tr> <tr class="separator:a884fac3cd6be2c09deb807e959d78b3a"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a2c6b408477f59b40f0aec51d5980eb8e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__vsi_8h.html#a2c6b408477f59b40f0aec51d5980eb8e">VSIInstallStdinHandler</a> (void)</td></tr> <tr class="memdesc:a2c6b408477f59b40f0aec51d5980eb8e"><td class="mdescLeft"> </td><td class="mdescRight">Install /vsistdin/ file system handler. <a href="#a2c6b408477f59b40f0aec51d5980eb8e">More...</a><br/></td></tr> <tr class="separator:a2c6b408477f59b40f0aec51d5980eb8e"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a61d2250ab2b22ca79b051a8479ee5383"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__vsi_8h.html#a61d2250ab2b22ca79b051a8479ee5383">VSIInstallStdoutHandler</a> (void)</td></tr> <tr class="memdesc:a61d2250ab2b22ca79b051a8479ee5383"><td class="mdescLeft"> </td><td class="mdescRight">Install /vsistdout/ file system handler. <a href="#a61d2250ab2b22ca79b051a8479ee5383">More...</a><br/></td></tr> <tr class="separator:a61d2250ab2b22ca79b051a8479ee5383"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ab79aed725b28eb22471a8b6733405843"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__vsi_8h.html#ab79aed725b28eb22471a8b6733405843">VSIInstallSparseFileHandler</a> (void)</td></tr> <tr class="separator:ab79aed725b28eb22471a8b6733405843"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ad6dd983338849e7da4eaa88f6458ab64"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__vsi_8h.html#ad6dd983338849e7da4eaa88f6458ab64">VSIInstallTarFileHandler</a> (void)</td></tr> <tr class="memdesc:ad6dd983338849e7da4eaa88f6458ab64"><td class="mdescLeft"> </td><td class="mdescRight">Install /vsitar/ file system handler. <a href="#ad6dd983338849e7da4eaa88f6458ab64">More...</a><br/></td></tr> <tr class="separator:ad6dd983338849e7da4eaa88f6458ab64"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:af9c1b931449d423e7a80bacb75ff0717"><td class="memItemLeft" align="right" valign="top">VSILFILE * </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__vsi_8h.html#af9c1b931449d423e7a80bacb75ff0717">VSIFileFromMemBuffer</a> (const char *pszFilename, GByte *pabyData, vsi_l_offset nDataLength, int bTakeOwnership)</td></tr> <tr class="memdesc:af9c1b931449d423e7a80bacb75ff0717"><td class="mdescLeft"> </td><td class="mdescRight">Create memory "file" from a buffer. <a href="#af9c1b931449d423e7a80bacb75ff0717">More...</a><br/></td></tr> <tr class="separator:af9c1b931449d423e7a80bacb75ff0717"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:aeaf26bcc4a5314371f426bb2a5e6ce7a"><td class="memItemLeft" align="right" valign="top">GByte * </td><td class="memItemRight" valign="bottom"><a class="el" href="cpl__vsi_8h.html#aeaf26bcc4a5314371f426bb2a5e6ce7a">VSIGetMemFileBuffer</a> (const char *pszFilename, vsi_l_offset *pnDataLength, int bUnlinkAndSeize)</td></tr> <tr class="memdesc:aeaf26bcc4a5314371f426bb2a5e6ce7a"><td class="mdescLeft"> </td><td class="mdescRight">Fetch buffer underlying memory file. <a href="#aeaf26bcc4a5314371f426bb2a5e6ce7a">More...</a><br/></td></tr> <tr class="separator:aeaf26bcc4a5314371f426bb2a5e6ce7a"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><p>Standard C Covers</p> <p>The VSI functions are intended to be hookable aliases for Standard C I/O, memory allocation and other system functions. They are intended to allow virtualization of disk I/O so that non file data sources can be made to appear as files, and so that additional error trapping and reporting can be interested. The memory access API is aliased so that special application memory management services can be used.</p> <p>Is is intended that each of these functions retains exactly the same calling pattern as the original Standard C functions they relate to. This means we don't have to provide custom documentation, and also means that the default implementation is very simple. </p> </div><h2 class="groupheader">Function Documentation</h2> <a class="anchor" id="a82fe6612261c1948eee388e75b7d6db7"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int VSIFCloseL </td> <td>(</td> <td class="paramtype">VSILFILE * </td> <td class="paramname"><em>fp</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Close file. </p> <p>This function closes the indicated file.</p> <p>This method goes through the VSIFileHandler virtualization and may work on unusual filesystems such as in memory.</p> <p>Analog of the POSIX fclose() function.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">fp</td><td>file handle opened with <a class="el" href="cpl__vsi_8h.html#ad487ad46f2841815f331292051192d5f" title="Open file. ">VSIFOpenL()</a>.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>0 on success or -1 on failure. </dd></dl> <p>Referenced by <a class="el" href="cpl__conv_8h.html#a1afd2c936bbf27a74b02ae6dcadf25a7">CPLCloseShared()</a>, <a class="el" href="cpl__minixml_8h.html#af44f5b9702a469037e7df18dda8d982c">CPLSerializeXMLTreeToFile()</a>, <a class="el" href="cpl__string_8h.html#a52852635691b8ca3390ab98d000b5e45">CSLLoad2()</a>, and <a class="el" href="cpl__vsi_8h.html#a6c5ab5def482f0efc439162b2896b4ea">VSIIngestFile()</a>.</p> </div> </div> <a class="anchor" id="ab72b69150d9dd7adb6e756196867a9b2"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int VSIFEofL </td> <td>(</td> <td class="paramtype">VSILFILE * </td> <td class="paramname"><em>fp</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Test for end of file. </p> <p>Returns TRUE (non-zero) if an end-of-file condition occured during the previous read operation. The end-of-file flag is cleared by a successfull <a class="el" href="cpl__vsi_8h.html#aeac1c2bc2d4dac71e504f62be5c564f3" title="Seek to requested offset. ">VSIFSeekL()</a> call.</p> <p>This method goes through the VSIFileHandler virtualization and may work on unusual filesystems such as in memory.</p> <p>Analog of the POSIX feof() call.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">fp</td><td>file handle opened with <a class="el" href="cpl__vsi_8h.html#ad487ad46f2841815f331292051192d5f" title="Open file. ">VSIFOpenL()</a>.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>TRUE if at EOF else FALSE. </dd></dl> <p>Referenced by <a class="el" href="cpl__string_8h.html#a52852635691b8ca3390ab98d000b5e45">CSLLoad2()</a>.</p> </div> </div> <a class="anchor" id="a224b7e3c50275ae1924e89185df5494d"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int VSIFFlushL </td> <td>(</td> <td class="paramtype">VSILFILE * </td> <td class="paramname"><em>fp</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Flush pending writes to disk. </p> <p>For files in write or update mode and on filesystem types where it is applicable, all pending output on the file is flushed to the physical disk.</p> <p>This method goes through the VSIFileHandler virtualization and may work on unusual filesystems such as in memory.</p> <p>Analog of the POSIX fflush() call.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">fp</td><td>file handle opened with <a class="el" href="cpl__vsi_8h.html#ad487ad46f2841815f331292051192d5f" title="Open file. ">VSIFOpenL()</a>.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>0 on success or -1 on error. </dd></dl> </div> </div> <a class="anchor" id="a41fd7388a7491b3430d0abe961dada82"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void* VSIFGetNativeFileDescriptorL </td> <td>(</td> <td class="paramtype">VSILFILE * </td> <td class="paramname"><em>fp</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Returns the "native" file descriptor for the virtual handle. </p> <p>This will only return a non-NULL value for "real" files handled by the operating system (to be opposed to GDAL virtual file systems).</p> <p>On POSIX systems, this will be a integer value ("fd") cast as a void*. On Windows systems, this will be the HANDLE.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">fp</td><td>file handle opened with <a class="el" href="cpl__vsi_8h.html#ad487ad46f2841815f331292051192d5f" title="Open file. ">VSIFOpenL()</a>.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>the native file descriptor, or NULL. </dd></dl> </div> </div> <a class="anchor" id="af9c1b931449d423e7a80bacb75ff0717"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">VSILFILE* VSIFileFromMemBuffer </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszFilename</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">GByte * </td> <td class="paramname"><em>pabyData</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">vsi_l_offset </td> <td class="paramname"><em>nDataLength</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>bTakeOwnership</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Create memory "file" from a buffer. </p> <p>A virtual memory file is created from the passed buffer with the indicated filename. Under normal conditions the filename would need to be absolute and within the /vsimem/ portion of the filesystem.</p> <p>If bTakeOwnership is TRUE, then the memory file system handler will take ownership of the buffer, freeing it when the file is deleted. Otherwise it remains the responsibility of the caller, but should not be freed as long as it might be accessed as a file. In no circumstances does this function take a copy of the pabyData contents.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszFilename</td><td>the filename to be created. </td></tr> <tr><td class="paramname">pabyData</td><td>the data buffer for the file. </td></tr> <tr><td class="paramname">nDataLength</td><td>the length of buffer in bytes. </td></tr> <tr><td class="paramname">bTakeOwnership</td><td>TRUE to transfer "ownership" of buffer or FALSE.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>open file handle on created file (see <a class="el" href="cpl__vsi_8h.html#ad487ad46f2841815f331292051192d5f" title="Open file. ">VSIFOpenL()</a>). </dd></dl> <p>References <a class="el" href="cpl__vsi_8h.html#a66e2e6f093fd42f8a941b962d4c8a19e">VSIInstallMemFileHandler()</a>.</p> </div> </div> <a class="anchor" id="ad487ad46f2841815f331292051192d5f"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">VSILFILE* VSIFOpenL </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszFilename</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszAccess</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Open file. </p> <p>This function opens a file with the desired access. Large files (larger than 2GB) should be supported. Binary access is always implied and the "b" does not need to be included in the pszAccess string.</p> <p>Note that the "VSILFILE *" returned since GDAL 1.8.0 by this function is <em>NOT</em> a standard C library FILE *, and cannot be used with any functions other than the "VSI*L" family of functions. They aren't "real" FILE objects.</p> <p>On windows it is possible to define the configuration option GDAL_FILE_IS_UTF8 to have pszFilename treated as being in the local encoding instead of UTF-8, retoring the pre-1.8.0 behavior of <a class="el" href="cpl__vsi_8h.html#ad487ad46f2841815f331292051192d5f" title="Open file. ">VSIFOpenL()</a>.</p> <p>This method goes through the VSIFileHandler virtualization and may work on unusual filesystems such as in memory.</p> <p>Analog of the POSIX fopen() function.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszFilename</td><td>the file to open. UTF-8 encoded. </td></tr> <tr><td class="paramname">pszAccess</td><td>access requested (ie. "r", "r+", "w".</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>NULL on failure, or the file handle. </dd></dl> <p>Referenced by <a class="el" href="cpl__conv_8h.html#af47485362aca554e37796c352a77fc71">CPLOpenShared()</a>, <a class="el" href="cpl__minixml_8h.html#af44f5b9702a469037e7df18dda8d982c">CPLSerializeXMLTreeToFile()</a>, <a class="el" href="cpl__string_8h.html#a52852635691b8ca3390ab98d000b5e45">CSLLoad2()</a>, and <a class="el" href="cpl__vsi_8h.html#a6c5ab5def482f0efc439162b2896b4ea">VSIIngestFile()</a>.</p> </div> </div> <a class="anchor" id="ad19d593846fa567ada334b12a7bf8a3b"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int VSIFPrintfL </td> <td>(</td> <td class="paramtype">VSILFILE * </td> <td class="paramname"><em>fp</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszFormat</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"> </td> <td class="paramname"><em>...</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Formatted write to file. </p> <p>Provides fprintf() style formatted output to a VSI*L file. This formats an internal buffer which is written using <a class="el" href="cpl__vsi_8h.html#a2a382b55d461f4979f523e8c6e257ada" title="Write bytes to file. ">VSIFWriteL()</a>.</p> <p>Analog of the POSIX fprintf() call.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">fp</td><td>file handle opened with <a class="el" href="cpl__vsi_8h.html#ad487ad46f2841815f331292051192d5f" title="Open file. ">VSIFOpenL()</a>. </td></tr> <tr><td class="paramname">pszFormat</td><td>the printf style format string.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>the number of bytes written or -1 on an error. </dd></dl> <p>References <a class="el" href="cpl__vsi_8h.html#a2a382b55d461f4979f523e8c6e257ada">VSIFWriteL()</a>.</p> </div> </div> <a class="anchor" id="aaddb197f5fb0d431a565b89281d42d93"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">size_t VSIFReadL </td> <td>(</td> <td class="paramtype">void * </td> <td class="paramname"><em>pBuffer</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t </td> <td class="paramname"><em>nSize</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t </td> <td class="paramname"><em>nCount</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">VSILFILE * </td> <td class="paramname"><em>fp</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Read bytes from file. </p> <p>Reads nCount objects of nSize bytes from the indicated file at the current offset into the indicated buffer.</p> <p>This method goes through the VSIFileHandler virtualization and may work on unusual filesystems such as in memory.</p> <p>Analog of the POSIX fread() call.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pBuffer</td><td>the buffer into which the data should be read (at least nCount * nSize bytes in size. </td></tr> <tr><td class="paramname">nSize</td><td>size of objects to read in bytes. </td></tr> <tr><td class="paramname">nCount</td><td>number of objects to read. </td></tr> <tr><td class="paramname">fp</td><td>file handle opened with <a class="el" href="cpl__vsi_8h.html#ad487ad46f2841815f331292051192d5f" title="Open file. ">VSIFOpenL()</a>.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>number of objects successfully read. </dd></dl> <p>Referenced by <a class="el" href="cpl__conv_8h.html#a37852d607dea3a4995be57e88415f391">CPLReadLine2L()</a>, and <a class="el" href="cpl__vsi_8h.html#a6c5ab5def482f0efc439162b2896b4ea">VSIIngestFile()</a>.</p> </div> </div> <a class="anchor" id="aaeb325d9dcb43c16a3fa1592ed7c1d2b"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int VSIFReadMultiRangeL </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>nRanges</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">void ** </td> <td class="paramname"><em>ppData</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const vsi_l_offset * </td> <td class="paramname"><em>panOffsets</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const size_t * </td> <td class="paramname"><em>panSizes</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">VSILFILE * </td> <td class="paramname"><em>fp</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Read several ranges of bytes from file. </p> <p>Reads nRanges objects of panSizes[i] bytes from the indicated file at the offset panOffsets[i] into the buffer ppData[i].</p> <p>Ranges must be sorted in ascending start offset, and must not overlap each other.</p> <p>This method goes through the VSIFileHandler virtualization and may work on unusual filesystems such as in memory or /vsicurl/.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">nRanges</td><td>number of ranges to read. </td></tr> <tr><td class="paramname">ppData</td><td>array of nRanges buffer into which the data should be read (ppData[i] must be at list panSizes[i] bytes). </td></tr> <tr><td class="paramname">panOffsets</td><td>array of nRanges offsets at which the data should be read. </td></tr> <tr><td class="paramname">panSizes</td><td>array of nRanges sizes of objects to read (in bytes). </td></tr> <tr><td class="paramname">fp</td><td>file handle opened with <a class="el" href="cpl__vsi_8h.html#ad487ad46f2841815f331292051192d5f" title="Open file. ">VSIFOpenL()</a>.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>0 in case of success, -1 otherwise. </dd></dl> <dl class="section since"><dt>Since</dt><dd>GDAL 1.9.0 </dd></dl> </div> </div> <a class="anchor" id="aeac1c2bc2d4dac71e504f62be5c564f3"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int VSIFSeekL </td> <td>(</td> <td class="paramtype">VSILFILE * </td> <td class="paramname"><em>fp</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">vsi_l_offset </td> <td class="paramname"><em>nOffset</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>nWhence</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Seek to requested offset. </p> <p>Seek to the desired offset (nOffset) in the indicated file.</p> <p>This method goes through the VSIFileHandler virtualization and may work on unusual filesystems such as in memory.</p> <p>Analog of the POSIX fseek() call.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">fp</td><td>file handle opened with <a class="el" href="cpl__vsi_8h.html#ad487ad46f2841815f331292051192d5f" title="Open file. ">VSIFOpenL()</a>. </td></tr> <tr><td class="paramname">nOffset</td><td>offset in bytes. </td></tr> <tr><td class="paramname">nWhence</td><td>one of SEEK_SET, SEEK_CUR or SEEK_END.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>0 on success or -1 one failure. </dd></dl> <p>Referenced by <a class="el" href="cpl__conv_8h.html#a37852d607dea3a4995be57e88415f391">CPLReadLine2L()</a>, and <a class="el" href="cpl__vsi_8h.html#a6c5ab5def482f0efc439162b2896b4ea">VSIIngestFile()</a>.</p> </div> </div> <a class="anchor" id="a25fe184bb565bbda49965102dbe0ca15"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">vsi_l_offset VSIFTellL </td> <td>(</td> <td class="paramtype">VSILFILE * </td> <td class="paramname"><em>fp</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Tell current file offset. </p> <p>Returns the current file read/write offset in bytes from the beginning of the file.</p> <p>This method goes through the VSIFileHandler virtualization and may work on unusual filesystems such as in memory.</p> <p>Analog of the POSIX ftell() call.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">fp</td><td>file handle opened with <a class="el" href="cpl__vsi_8h.html#ad487ad46f2841815f331292051192d5f" title="Open file. ">VSIFOpenL()</a>.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>file offset in bytes. </dd></dl> <p>Referenced by <a class="el" href="cpl__conv_8h.html#a37852d607dea3a4995be57e88415f391">CPLReadLine2L()</a>, and <a class="el" href="cpl__vsi_8h.html#a6c5ab5def482f0efc439162b2896b4ea">VSIIngestFile()</a>.</p> </div> </div> <a class="anchor" id="a3363cbf28c47b5dcadaf0812dd50e6b9"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int VSIFTruncateL </td> <td>(</td> <td class="paramtype">VSILFILE * </td> <td class="paramname"><em>fp</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">vsi_l_offset </td> <td class="paramname"><em>nNewSize</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Truncate/expand the file to the specified size. </p> <p>This method goes through the VSIFileHandler virtualization and may work on unusual filesystems such as in memory.</p> <p>Analog of the POSIX ftruncate() call.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">fp</td><td>file handle opened with <a class="el" href="cpl__vsi_8h.html#ad487ad46f2841815f331292051192d5f" title="Open file. ">VSIFOpenL()</a>. </td></tr> <tr><td class="paramname">nNewSize</td><td>new size in bytes.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>0 on success </dd></dl> <dl class="section since"><dt>Since</dt><dd>GDAL 1.9.0 </dd></dl> </div> </div> <a class="anchor" id="a2a382b55d461f4979f523e8c6e257ada"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">size_t VSIFWriteL </td> <td>(</td> <td class="paramtype">const void * </td> <td class="paramname"><em>pBuffer</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t </td> <td class="paramname"><em>nSize</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t </td> <td class="paramname"><em>nCount</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">VSILFILE * </td> <td class="paramname"><em>fp</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Write bytes to file. </p> <p>Writess nCount objects of nSize bytes to the indicated file at the current offset into the indicated buffer.</p> <p>This method goes through the VSIFileHandler virtualization and may work on unusual filesystems such as in memory.</p> <p>Analog of the POSIX fwrite() call.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pBuffer</td><td>the buffer from which the data should be written (at least nCount * nSize bytes in size. </td></tr> <tr><td class="paramname">nSize</td><td>size of objects to read in bytes. </td></tr> <tr><td class="paramname">nCount</td><td>number of objects to read. </td></tr> <tr><td class="paramname">fp</td><td>file handle opened with <a class="el" href="cpl__vsi_8h.html#ad487ad46f2841815f331292051192d5f" title="Open file. ">VSIFOpenL()</a>.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>number of objects successfully written. </dd></dl> <p>Referenced by <a class="el" href="cpl__minixml_8h.html#af44f5b9702a469037e7df18dda8d982c">CPLSerializeXMLTreeToFile()</a>, and <a class="el" href="cpl__vsi_8h.html#ad19d593846fa567ada334b12a7bf8a3b">VSIFPrintfL()</a>.</p> </div> </div> <a class="anchor" id="aeaf26bcc4a5314371f426bb2a5e6ce7a"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">GByte* VSIGetMemFileBuffer </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszFilename</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">vsi_l_offset * </td> <td class="paramname"><em>pnDataLength</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>bUnlinkAndSeize</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Fetch buffer underlying memory file. </p> <p>This function returns a pointer to the memory buffer underlying a virtual "in memory" file. If bUnlinkAndSeize is TRUE the filesystem object will be deleted, and ownership of the buffer will pass to the caller otherwise the underlying file will remain in existance.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszFilename</td><td>the name of the file to grab the buffer of. </td></tr> <tr><td class="paramname">pnDataLength</td><td>(file) length returned in this variable. </td></tr> <tr><td class="paramname">bUnlinkAndSeize</td><td>TRUE to remove the file, or FALSE to leave unaltered.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>pointer to memory buffer or NULL on failure. </dd></dl> <p>References <a class="el" href="cpl__error_8h.html#ad0c5d3481dd34c1f3a0f7775ebf74817">CPLDebug()</a>.</p> </div> </div> <a class="anchor" id="a6c5ab5def482f0efc439162b2896b4ea"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int VSIIngestFile </td> <td>(</td> <td class="paramtype">VSILFILE * </td> <td class="paramname"><em>fp</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszFilename</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">GByte ** </td> <td class="paramname"><em>ppabyRet</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">vsi_l_offset * </td> <td class="paramname"><em>pnSize</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">GIntBig </td> <td class="paramname"><em>nMaxSize</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Ingest a file into memory. </p> <p>Read the whole content of a file into a memory buffer.</p> <p>Either fp or pszFilename can be NULL, but not both at the same time.</p> <p>If fp is passed non-NULL, it is the responsibility of the caller to close it.</p> <p>If non-NULL, the returned buffer is guaranteed to be NUL-terminated.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">fp</td><td>file handle opened with <a class="el" href="cpl__vsi_8h.html#ad487ad46f2841815f331292051192d5f" title="Open file. ">VSIFOpenL()</a>. </td></tr> <tr><td class="paramname">pszFilename</td><td>filename. </td></tr> <tr><td class="paramname">ppabyRet</td><td>pointer to the target buffer. *ppabyRet must be freed with VSIFree() </td></tr> <tr><td class="paramname">pnSize</td><td>pointer to variable to store the file size. May be NULL. </td></tr> <tr><td class="paramname">nMaxSize</td><td>maximum size of file allowed. If no limit, set to a negative value.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>TRUE in case of success.</dd></dl> <dl class="section since"><dt>Since</dt><dd>GDAL 1.11 </dd></dl> <p>References <a class="el" href="cpl__error_8h.html#aad2b98dd58e4de706a245faddac90403">CPLError()</a>, <a class="el" href="cpl__vsi_8h.html#a82fe6612261c1948eee388e75b7d6db7">VSIFCloseL()</a>, <a class="el" href="cpl__vsi_8h.html#ad487ad46f2841815f331292051192d5f">VSIFOpenL()</a>, <a class="el" href="cpl__vsi_8h.html#aaddb197f5fb0d431a565b89281d42d93">VSIFReadL()</a>, <a class="el" href="cpl__vsi_8h.html#aeac1c2bc2d4dac71e504f62be5c564f3">VSIFSeekL()</a>, and <a class="el" href="cpl__vsi_8h.html#a25fe184bb565bbda49965102dbe0ca15">VSIFTellL()</a>.</p> <p>Referenced by <a class="el" href="cpl__minixml_8h.html#aebe69e0041052c5bf04f5ba90ad77234">CPLParseXMLFile()</a>.</p> </div> </div> <a class="anchor" id="a4f791960f2d86713d16e99e9c0c36258"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void VSIInstallCurlFileHandler </td> <td>(</td> <td class="paramtype">void </td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Install /vsicurl/ HTTP/FTP file system handler (requires libcurl) </p> <p>A special file handler is installed that allows reading on-the-fly of files available through HTTP/FTP web protocols, without downloading the entire file.</p> <p>Recognized filenames are of the form /vsicurl/http://path/to/remote/ressource or /vsicurl/ftp://path/to/remote/ressource where path/to/remote/ressource is the URL of a remote ressource.</p> <p>Partial downloads (requires the HTTP server to support random reading) are done with a 16 KB granularity by default. If the driver detects sequential reading it will progressively increase the chunk size up to 2 MB to improve download performance.</p> <p>The GDAL_HTTP_PROXY, GDAL_HTTP_PROXYUSERPWD and GDAL_PROXY_AUTH configuration options can be used to define a proxy server. The syntax to use is the one of Curl CURLOPT_PROXY, CURLOPT_PROXYUSERPWD and CURLOPT_PROXYAUTH options.</p> <p>Starting with GDAL 1.10, the file can be cached in RAM by setting the configuration option VSI_CACHE to TRUE. The cache size defaults to 25 MB, but can be modified by setting the configuration option VSI_CACHE_SIZE (in bytes).</p> <p><a class="el" href="cpl__vsi_8h.html#ac92fbd5e6fc143b026001b32c4c19ed1" title="Get filesystem object info. ">VSIStatL()</a> will return the size in st_size member and file nature- file or directory - in st_mode member (the later only reliable with FTP resources for now).</p> <p><a class="el" href="cpl__vsi_8h.html#a6158d73485d6cf92c75b38e7f26d00c3" title="Read names in a directory. ">VSIReadDir()</a> should be able to parse the HTML directory listing returned by the most popular web servers, such as Apache or Microsoft IIS.</p> <p>This special file handler can be combined with other virtual filesystems handlers, such as /vsizip. For example, /vsizip//vsicurl/path/to/remote/file.zip/path/inside/zip</p> <dl class="section since"><dt>Since</dt><dd>GDAL 1.8.0 </dd></dl> </div> </div> <a class="anchor" id="ab187e6713f07be9756c22c58b782642d"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void VSIInstallCurlStreamingFileHandler </td> <td>(</td> <td class="paramtype">void </td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Install /vsicurl_streaming/ HTTP/FTP file system handler (requires libcurl) </p> <p>A special file handler is installed that allows on-the-fly reading of files streamed through HTTP/FTP web protocols (typically dynamically generated files), without downloading the entire file.</p> <p>Although this file handler is able seek to random offsets in the file, this will not be efficient. If you need efficient random access and that the server supports range dowloading, you should use the /vsicurl/ file system handler instead.</p> <p>Recognized filenames are of the form /vsicurl_streaming/http://path/to/remote/ressource or /vsicurl_streaming/ftp://path/to/remote/ressource where path/to/remote/ressource is the URL of a remote ressource.</p> <p>The GDAL_HTTP_PROXY, GDAL_HTTP_PROXYUSERPWD and GDAL_PROXY_AUTH configuration options can be used to define a proxy server. The syntax to use is the one of Curl CURLOPT_PROXY, CURLOPT_PROXYUSERPWD and CURLOPT_PROXYAUTH options.</p> <p>The file can be cached in RAM by setting the configuration option VSI_CACHE to TRUE. The cache size defaults to 25 MB, but can be modified by setting the configuration option VSI_CACHE_SIZE (in bytes).</p> <p><a class="el" href="cpl__vsi_8h.html#ac92fbd5e6fc143b026001b32c4c19ed1" title="Get filesystem object info. ">VSIStatL()</a> will return the size in st_size member and file nature- file or directory - in st_mode member (the later only reliable with FTP resources for now).</p> <dl class="section since"><dt>Since</dt><dd>GDAL 1.10 </dd></dl> </div> </div> <a class="anchor" id="a3cde09f204df6f417653b7af4761178e"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void VSIInstallGZipFileHandler </td> <td>(</td> <td class="paramtype">void </td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Install GZip file system handler. </p> <p>A special file handler is installed that allows reading on-the-fly and writing in GZip (.gz) files.</p> <p>All portions of the file system underneath the base path "/vsigzip/" will be handled by this driver.</p> <p>Additional documentation is to be found at <a href="http://trac.osgeo.org/gdal/wiki/UserDocs/ReadInZip">http://trac.osgeo.org/gdal/wiki/UserDocs/ReadInZip</a></p> <dl class="section since"><dt>Since</dt><dd>GDAL 1.6.0 </dd></dl> </div> </div> <a class="anchor" id="a66e2e6f093fd42f8a941b962d4c8a19e"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void VSIInstallMemFileHandler </td> <td>(</td> <td class="paramtype">void </td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Install "memory" file system handler. </p> <p>A special file handler is installed that allows block of memory to be treated as files. All portions of the file system underneath the base path "/vsimem/" will be handled by this driver.</p> <p>Normal VSI*L functions can be used freely to create and destroy memory arrays treating them as if they were real file system objects. Some additional methods exist to efficient create memory file system objects without duplicating original copies of the data or to "steal" the block of memory associated with a memory file.</p> <p>At this time the memory handler does not properly handle directory semantics for the memory portion of the filesystem. The <a class="el" href="cpl__vsi_8h.html#a6158d73485d6cf92c75b38e7f26d00c3" title="Read names in a directory. ">VSIReadDir()</a> function is not supported though this will be corrected in the future.</p> <p>Calling this function repeatedly should do no harm, though it is not necessary. It is already called the first time a virtualizable file access function (ie. <a class="el" href="cpl__vsi_8h.html#ad487ad46f2841815f331292051192d5f" title="Open file. ">VSIFOpenL()</a>, VSIMkDir(), etc) is called.</p> <p>This code example demonstrates using GDAL to translate from one memory buffer to another.</p> <div class="fragment"><div class="line">* GByte *ConvertBufferFormat( GByte *pabyInData, vsi_l_offset nInDataLength, </div> <div class="line">* vsi_l_offset *pnOutDataLength )</div> <div class="line">* {</div> <div class="line">* <span class="comment">// create memory file system object from buffer.</span></div> <div class="line">* <a class="code" href="cpl__vsi_8h.html#a82fe6612261c1948eee388e75b7d6db7">VSIFCloseL</a>( <a class="code" href="cpl__vsi_8h.html#af9c1b931449d423e7a80bacb75ff0717">VSIFileFromMemBuffer</a>( <span class="stringliteral">"/vsimem/work.dat"</span>, pabyInData,</div> <div class="line">* nInDataLength, FALSE ) );</div> <div class="line">*</div> <div class="line">* <span class="comment">// Open memory buffer for read.</span></div> <div class="line">* GDALDatasetH hDS = GDALOpen( <span class="stringliteral">"/vsimem/work.dat"</span>, GA_ReadOnly );</div> <div class="line">* </div> <div class="line">* <span class="comment">// Get output format driver. </span></div> <div class="line">* GDALDriverH hDriver = GDALGetDriverByName( <span class="stringliteral">"GTiff"</span> );</div> <div class="line">* GDALDatasetH hOutDS;</div> <div class="line">*</div> <div class="line">* hOutDS = GDALCreateCopy( hDriver, <span class="stringliteral">"/vsimem/out.tif"</span>, hDS, TRUE, NULL, </div> <div class="line">* NULL, NULL );</div> <div class="line">* </div> <div class="line">* <span class="comment">// close source file, and "unlink" it. </span></div> <div class="line">* GDALClose( hDS );</div> <div class="line">* <a class="code" href="cpl__vsi_8h.html#a69dad1bd6f1af9935c1523db0c6c212f">VSIUnlink</a>( <span class="stringliteral">"/vsimem/work.dat"</span> );</div> <div class="line">*</div> <div class="line">* <span class="comment">// seize the buffer associated with the output file.</span></div> <div class="line">*</div> <div class="line">* <span class="keywordflow">return</span> <a class="code" href="cpl__vsi_8h.html#aeaf26bcc4a5314371f426bb2a5e6ce7a">VSIGetMemFileBuffer</a>( <span class="stringliteral">"/vsimem/out.tif"</span>, pnOutDataLength, TRUE );</div> <div class="line">* }</div> <div class="line">* </div> </div><!-- fragment --> <p>Referenced by <a class="el" href="cpl__vsi_8h.html#af9c1b931449d423e7a80bacb75ff0717">VSIFileFromMemBuffer()</a>.</p> </div> </div> <a class="anchor" id="ab79aed725b28eb22471a8b6733405843"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void VSIInstallSparseFileHandler </td> <td>(</td> <td class="paramtype">void </td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Install /vsisparse/ virtual file handler.</p> <p>The sparse virtual file handler allows a virtual file to be composed from chunks of data in other files, potentially with large spaces in the virtual file set to a constant value. This can make it possible to test some sorts of operations on what seems to be a large file with image data set to a constant value. It is also helpful when wanting to add test files to the test suite that are too large, but for which most of the data can be ignored. It could, in theory, also be used to treat several files on different file systems as one large virtual file.</p> <p>The file referenced by /vsisparse/ should be an XML control file formatted something like:</p> <pre class="fragment"><VSISparseFile> <Length>87629264</Length> <SubfileRegion> Stuff at start of file. <Filename relative="1">251_head.dat</Filename> <DestinationOffset>0</DestinationOffset> <SourceOffset>0</SourceOffset> <RegionLength>2768</RegionLength> </SubfileRegion> <SubfileRegion> RasterDMS node. <Filename relative="1">251_rasterdms.dat</Filename> <DestinationOffset>87313104</DestinationOffset> <SourceOffset>0</SourceOffset> <RegionLength>160</RegionLength> </SubfileRegion> <SubfileRegion> Stuff at end of file. <Filename relative="1">251_tail.dat</Filename> <DestinationOffset>87611924</DestinationOffset> <SourceOffset>0</SourceOffset> <RegionLength>17340</RegionLength> </SubfileRegion> <ConstantRegion> Default for the rest of the file. <DestinationOffset>0</DestinationOffset> <RegionLength>87629264</RegionLength> <Value>0</Value> </ConstantRegion> </VSISparseFile> </pre><p>Hopefully the values and semantics are fairly obvious.</p> <p>This driver is installed by default. </p> </div> </div> <a class="anchor" id="a2c6b408477f59b40f0aec51d5980eb8e"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void VSIInstallStdinHandler </td> <td>(</td> <td class="paramtype">void </td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Install /vsistdin/ file system handler. </p> <p>A special file handler is installed that allows reading from the standard input steam.</p> <p>The file operations available are of course limited to Read() and forward Seek() (full seek in the first MB of a file).</p> <dl class="section since"><dt>Since</dt><dd>GDAL 1.8.0 </dd></dl> </div> </div> <a class="anchor" id="a61d2250ab2b22ca79b051a8479ee5383"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void VSIInstallStdoutHandler </td> <td>(</td> <td class="paramtype">void </td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Install /vsistdout/ file system handler. </p> <p>A special file handler is installed that allows writing to the standard output stream.</p> <p>The file operations available are of course limited to Write().</p> <dl class="section since"><dt>Since</dt><dd>GDAL 1.8.0 </dd></dl> </div> </div> <a class="anchor" id="abaee4232440e012b4b9920934fc571cc"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void VSIInstallSubFileHandler </td> <td>(</td> <td class="paramtype">void </td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Install /vsisubfile/ virtual file handler.</p> <p>This virtual file system handler allows access to subregions of files, treating them as a file on their own to the virtual file system functions (<a class="el" href="cpl__vsi_8h.html#ad487ad46f2841815f331292051192d5f" title="Open file. ">VSIFOpenL()</a>, etc).</p> <p>A special form of the filename is used to indicate a subportion of another file:</p> <p>/vsisubfile/<offset>[_<size>],<filename></p> <p>The size parameter is optional. Without it the remainder of the file from the start offset as treated as part of the subfile. Otherwise only <size> bytes from <offset> are treated as part of the subfile. The <filename> portion may be a relative or absolute path using normal rules. The <offset> and <size> values are in bytes.</p> <p>eg. /vsisubfile/1000_3000,/data/abc.ntf /vsisubfile/5000,../xyz/raw.dat</p> <p>Unlike the /vsimem/ or conventional file system handlers, there is no meaningful support for filesystem operations for creating new files, traversing directories, and deleting files within the /vsisubfile/ area. Only the <a class="el" href="cpl__vsi_8h.html#ac92fbd5e6fc143b026001b32c4c19ed1" title="Get filesystem object info. ">VSIStatL()</a>, <a class="el" href="cpl__vsi_8h.html#ad487ad46f2841815f331292051192d5f" title="Open file. ">VSIFOpenL()</a> and operations based on the file handle returned by <a class="el" href="cpl__vsi_8h.html#ad487ad46f2841815f331292051192d5f" title="Open file. ">VSIFOpenL()</a> operate properly. </p> </div> </div> <a class="anchor" id="ad6dd983338849e7da4eaa88f6458ab64"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void VSIInstallTarFileHandler </td> <td>(</td> <td class="paramtype">void </td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Install /vsitar/ file system handler. </p> <p>A special file handler is installed that allows reading on-the-fly in TAR (regular .tar, or compressed .tar.gz/.tgz) archives.</p> <p>All portions of the file system underneath the base path "/vsitar/" will be handled by this driver.</p> <p>The syntax to open a file inside a zip file is /vsitar/path/to/the/file.tar/path/inside/the/tar/file were path/to/the/file.tar is relative or absolute and path/inside/the/tar/file is the relative path to the file inside the archive.</p> <p>If the path is absolute, it should begin with a / on a Unix-like OS (or C:\ on Windows), so the line looks like /vsitar//home/gdal/... For example gdalinfo /vsitar/myarchive.tar/subdir1/file1.tif</p> <p>Syntaxic sugar : if the tar archive contains only one file located at its root, just mentionning "/vsitar/path/to/the/file.tar" will work</p> <p><a class="el" href="cpl__vsi_8h.html#ac92fbd5e6fc143b026001b32c4c19ed1" title="Get filesystem object info. ">VSIStatL()</a> will return the uncompressed size in st_size member and file nature- file or directory - in st_mode member.</p> <p>Directory listing is available through <a class="el" href="cpl__vsi_8h.html#a6158d73485d6cf92c75b38e7f26d00c3" title="Read names in a directory. ">VSIReadDir()</a>.</p> <dl class="section since"><dt>Since</dt><dd>GDAL 1.8.0 </dd></dl> </div> </div> <a class="anchor" id="a884fac3cd6be2c09deb807e959d78b3a"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void VSIInstallZipFileHandler </td> <td>(</td> <td class="paramtype">void </td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Install ZIP file system handler. </p> <p>A special file handler is installed that allows reading on-the-fly in ZIP (.zip) archives.</p> <p>All portions of the file system underneath the base path "/vsizip/" will be handled by this driver.</p> <p>The syntax to open a file inside a zip file is /vsizip/path/to/the/file.zip/path/inside/the/zip/file were path/to/the/file.zip is relative or absolute and path/inside/the/zip/file is the relative path to the file inside the archive.</p> <p>If the path is absolute, it should begin with a / on a Unix-like OS (or C:\ on Windows), so the line looks like /vsizip//home/gdal/... For example gdalinfo /vsizip/myarchive.zip/subdir1/file1.tif</p> <p>Syntaxic sugar : if the .zip file contains only one file located at its root, just mentionning "/vsizip/path/to/the/file.zip" will work</p> <p><a class="el" href="cpl__vsi_8h.html#ac92fbd5e6fc143b026001b32c4c19ed1" title="Get filesystem object info. ">VSIStatL()</a> will return the uncompressed size in st_size member and file nature- file or directory - in st_mode member.</p> <p>Directory listing is available through <a class="el" href="cpl__vsi_8h.html#a6158d73485d6cf92c75b38e7f26d00c3" title="Read names in a directory. ">VSIReadDir()</a>.</p> <p>Since GDAL 1.8.0, write capabilities are available. They allow creating a new zip file and adding new files to an already existing (or just created) zip file. Read and write operations cannot be interleaved : the new zip must be closed before being re-opened for read.</p> <p>Additional documentation is to be found at <a href="http://trac.osgeo.org/gdal/wiki/UserDocs/ReadInZip">http://trac.osgeo.org/gdal/wiki/UserDocs/ReadInZip</a></p> <dl class="section since"><dt>Since</dt><dd>GDAL 1.6.0 </dd></dl> </div> </div> <a class="anchor" id="a36737f0cb2949ba2f7bbf23cc6592a04"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int VSIIsCaseSensitiveFS </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszFilename</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Returns if the filenames of the filesystem are case sensitive. </p> <p>This method retrieves to which filesystem belongs the passed filename and return TRUE if the filenames of that filesystem are case sensitive.</p> <p>Currently, this will return FALSE only for Windows real filenames. Other VSI virtual filesystems are case sensitive.</p> <p>This methods avoid ugly #ifndef WIN32 / #endif code, that is wrong when dealing with virtual filenames.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszFilename</td><td>the path of the filesystem object to be tested. UTF-8 encoded.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>TRUE if the filenames of the filesystem are case sensitive.</dd></dl> <dl class="section since"><dt>Since</dt><dd>GDAL 1.8.0 </dd></dl> <p>Referenced by <a class="el" href="cpl__conv_8h.html#a9c76b24b06830f0da04fe076177f9ff3">CPLFormCIFilename()</a>.</p> </div> </div> <a class="anchor" id="a9b88331b0be4f7f2bd43e7b830af7038"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void* VSIMalloc2 </td> <td>(</td> <td class="paramtype">size_t </td> <td class="paramname"><em>nSize1</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t </td> <td class="paramname"><em>nSize2</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>VSIMalloc2 allocates (nSize1 * nSize2) bytes. In case of overflow of the multiplication, or if memory allocation fails, a NULL pointer is returned and a CE_Failure error is raised with <a class="el" href="cpl__error_8h.html#aad2b98dd58e4de706a245faddac90403">CPLError()</a>. If nSize1 == 0 || nSize2 == 0, a NULL pointer will also be returned. CPLFree() or VSIFree() can be used to free memory allocated by this function. </p> <p>References <a class="el" href="cpl__error_8h.html#aad2b98dd58e4de706a245faddac90403">CPLError()</a>.</p> <p>Referenced by <a class="el" href="classOGRPolygon.html#a46b833f19bf35fcea113233310a245ce">OGRPolygon::importFromWkb()</a>.</p> </div> </div> <a class="anchor" id="a644254757e7d9ec23df256d34fff565d"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void* VSIMalloc3 </td> <td>(</td> <td class="paramtype">size_t </td> <td class="paramname"><em>nSize1</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t </td> <td class="paramname"><em>nSize2</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t </td> <td class="paramname"><em>nSize3</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>VSIMalloc3 allocates (nSize1 * nSize2 * nSize3) bytes. In case of overflow of the multiplication, or if memory allocation fails, a NULL pointer is returned and a CE_Failure error is raised with <a class="el" href="cpl__error_8h.html#aad2b98dd58e4de706a245faddac90403">CPLError()</a>. If nSize1 == 0 || nSize2 == 0 || nSize3 == 0, a NULL pointer will also be returned. CPLFree() or VSIFree() can be used to free memory allocated by this function. </p> <p>References <a class="el" href="cpl__error_8h.html#aad2b98dd58e4de706a245faddac90403">CPLError()</a>.</p> </div> </div> <a class="anchor" id="aef0a5243bbc47cf9645a135d0c7d26df"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int VSIMkdir </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszPathname</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">long </td> <td class="paramname"><em>mode</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Create a directory. </p> <p>Create a new directory with the indicated mode. The mode is ignored on some platforms. A reasonable default mode value would be 0666. This method goes through the VSIFileHandler virtualization and may work on unusual filesystems such as in memory.</p> <p>Analog of the POSIX mkdir() function.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszPathname</td><td>the path to the directory to create. UTF-8 encoded. </td></tr> <tr><td class="paramname">mode</td><td>the permissions mode.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>0 on success or -1 on an error. </dd></dl> </div> </div> <a class="anchor" id="a6158d73485d6cf92c75b38e7f26d00c3"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">char** VSIReadDir </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszPath</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Read names in a directory. </p> <p>This function abstracts access to directory contains. It returns a list of strings containing the names of files, and directories in this directory. The resulting string list becomes the responsibility of the application and should be freed with <a class="el" href="cpl__string_8h.html#a5a39b9c5896a273cc6f06c1d5be93238">CSLDestroy()</a> when no longer needed.</p> <p>Note that no error is issued via <a class="el" href="cpl__error_8h.html#aad2b98dd58e4de706a245faddac90403">CPLError()</a> if the directory path is invalid, though NULL is returned.</p> <p>This function used to be known as CPLReadDir(), but the old name is now deprecated.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszPath</td><td>the relative, or absolute path of a directory to read. UTF-8 encoded. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>The list of entries in the directory, or NULL if the directory doesn't exist. Filenames are returned in UTF-8 encoding. </dd></dl> <p>Referenced by <a class="el" href="cpl__vsi_8h.html#a03c473cd78f2dffabf709245a928e6c7">VSIReadDirRecursive()</a>.</p> </div> </div> <a class="anchor" id="a03c473cd78f2dffabf709245a928e6c7"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">char** VSIReadDirRecursive </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszPathIn</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Read names in a directory recursively. </p> <p>This function abstracts access to directory contents and subdirectories. It returns a list of strings containing the names of files and directories in this directory and all subdirectories. The resulting string list becomes the responsibility of the application and should be freed with <a class="el" href="cpl__string_8h.html#a5a39b9c5896a273cc6f06c1d5be93238">CSLDestroy()</a> when no longer needed.</p> <p>Note that no error is issued via <a class="el" href="cpl__error_8h.html#aad2b98dd58e4de706a245faddac90403">CPLError()</a> if the directory path is invalid, though NULL is returned.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszPathIn</td><td>the relative, or absolute path of a directory to read. UTF-8 encoded.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>The list of entries in the directory and subdirectories or NULL if the directory doesn't exist. Filenames are returned in UTF-8 encoding. </dd></dl> <dl class="section since"><dt>Since</dt><dd>GDAL 1.10.0 </dd></dl> <p>References <a class="el" href="classCPLStringList.html#afb284d82f71198fa175f6656cd8ca328">CPLStringList::AddString()</a>, <a class="el" href="cpl__conv_8h.html#a464d6861faf9f6272317d160a3ad9a81">CPLStrdup()</a>, <a class="el" href="cpl__string_8h.html#ac1ffd0e5baf9729f09388a38c07f5835">CSLCount()</a>, <a class="el" href="cpl__string_8h.html#a5a39b9c5896a273cc6f06c1d5be93238">CSLDestroy()</a>, <a class="el" href="classCPLStringList.html#a4784adc3ae6ad4dbb479496baa90d293">CPLStringList::StealList()</a>, <a class="el" href="cpl__vsi_8h.html#a6158d73485d6cf92c75b38e7f26d00c3">VSIReadDir()</a>, and <a class="el" href="cpl__vsi_8h.html#ac92fbd5e6fc143b026001b32c4c19ed1">VSIStatL()</a>.</p> </div> </div> <a class="anchor" id="a26cae93b5a32e11bef9ec7c118f8cca4"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int VSIRename </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>oldpath</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"><em>newpath</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Rename a file. </p> <p>Renames a file object in the file system. It should be possible to rename a file onto a new filesystem, but it is safest if this function is only used to rename files that remain in the same directory.</p> <p>This method goes through the VSIFileHandler virtualization and may work on unusual filesystems such as in memory.</p> <p>Analog of the POSIX rename() function.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">oldpath</td><td>the name of the file to be renamed. UTF-8 encoded. </td></tr> <tr><td class="paramname">newpath</td><td>the name the file should be given. UTF-8 encoded.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>0 on success or -1 on an error. </dd></dl> </div> </div> <a class="anchor" id="a763cceaa0966f37b71a0185c92bb3ad8"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int VSIRmdir </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszDirname</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Delete a directory. </p> <p>Deletes a directory object from the file system. On some systems the directory must be empty before it can be deleted.</p> <p>This method goes through the VSIFileHandler virtualization and may work on unusual filesystems such as in memory.</p> <p>Analog of the POSIX rmdir() function.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszDirname</td><td>the path of the directory to be deleted. UTF-8 encoded.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>0 on success or -1 on an error. </dd></dl> <p>Referenced by <a class="el" href="cpl__conv_8h.html#aa786ff8dd95ea5b2b641de9ed53cb277">CPLUnlinkTree()</a>.</p> </div> </div> <a class="anchor" id="ad1a691db1ba2f43add25a5c0d6498da6"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int VSIStatExL </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszFilename</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">VSIStatBufL * </td> <td class="paramname"><em>psStatBuf</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>nFlags</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Get filesystem object info. </p> <p>Fetches status information about a filesystem object (file, directory, etc). The returned information is placed in the VSIStatBufL structure. For portability only the st_size (size in bytes), and st_mode (file type). This method is similar to VSIStat(), but will work on large files on systems where this requires special calls.</p> <p>This method goes through the VSIFileHandler virtualization and may work on unusual filesystems such as in memory.</p> <p>Analog of the POSIX stat() function, with an extra parameter to specify which information is needed, which offers a potential for speed optimizations on specialized and potentially slow virtual filesystem objects (/vsigzip/, /vsicurl/)</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszFilename</td><td>the path of the filesystem object to be queried. UTF-8 encoded. </td></tr> <tr><td class="paramname">psStatBuf</td><td>the structure to load with information. </td></tr> <tr><td class="paramname">nFlags</td><td>0 to get all information, or VSI_STAT_EXISTS_FLAG, VSI_STAT_NATURE_FLAG or VSI_STAT_SIZE_FLAG, or a combination of those to get partial info.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>0 on success or -1 on an error.</dd></dl> <dl class="section since"><dt>Since</dt><dd>GDAL 1.8.0 </dd></dl> <p>Referenced by <a class="el" href="cpl__conv_8h.html#a9c76b24b06830f0da04fe076177f9ff3">CPLFormCIFilename()</a>, and <a class="el" href="cpl__vsi_8h.html#ac92fbd5e6fc143b026001b32c4c19ed1">VSIStatL()</a>.</p> </div> </div> <a class="anchor" id="ac92fbd5e6fc143b026001b32c4c19ed1"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int VSIStatL </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszFilename</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">VSIStatBufL * </td> <td class="paramname"><em>psStatBuf</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Get filesystem object info. </p> <p>Fetches status information about a filesystem object (file, directory, etc). The returned information is placed in the VSIStatBufL structure. For portability only the st_size (size in bytes), and st_mode (file type). This method is similar to VSIStat(), but will work on large files on systems where this requires special calls.</p> <p>This method goes through the VSIFileHandler virtualization and may work on unusual filesystems such as in memory.</p> <p>Analog of the POSIX stat() function.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszFilename</td><td>the path of the filesystem object to be queried. UTF-8 encoded. </td></tr> <tr><td class="paramname">psStatBuf</td><td>the structure to load with information.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>0 on success or -1 on an error. </dd></dl> <p>References <a class="el" href="cpl__vsi_8h.html#ad1a691db1ba2f43add25a5c0d6498da6">VSIStatExL()</a>.</p> <p>Referenced by <a class="el" href="classOGRSFDriverRegistrar.html#ae98efe100c0ecea4f6868e008838f878">OGRSFDriverRegistrar::AutoLoadDrivers()</a>, <a class="el" href="cpl__conv_8h.html#afa9b8f28ae84d5d898b7a3afc6bb6a4b">CPLCheckForFile()</a>, <a class="el" href="cpl__conv_8h.html#aa786ff8dd95ea5b2b641de9ed53cb277">CPLUnlinkTree()</a>, and <a class="el" href="cpl__vsi_8h.html#a03c473cd78f2dffabf709245a928e6c7">VSIReadDirRecursive()</a>.</p> </div> </div> <a class="anchor" id="a69dad1bd6f1af9935c1523db0c6c212f"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int VSIUnlink </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszFilename</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Delete a file. </p> <p>Deletes a file object from the file system.</p> <p>This method goes through the VSIFileHandler virtualization and may work on unusual filesystems such as in memory.</p> <p>Analog of the POSIX unlink() function.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszFilename</td><td>the path of the file to be deleted. UTF-8 encoded.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>0 on success or -1 on an error. </dd></dl> <p>Referenced by <a class="el" href="cpl__conv_8h.html#aa786ff8dd95ea5b2b641de9ed53cb277">CPLUnlinkTree()</a>.</p> </div> </div> </div><!-- contents --> <hr> Generated for GDAL by <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.8.5. </body> </html>