/usr/share/doc/libcext-dev/html/group__cxfileutils.html is in libcext-doc 7.1-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | <!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.10"/>
<title>C Standard Library Extensions: File Utilities</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 id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">C Standard Library Extensions
 <span id="projectnumber">1.2.2</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="files.html"><span>Files</span></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">File Utilities</div> </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gad1b34a4ae9f02012bf25f4431a783d1f"><td class="memItemLeft" align="right" valign="top">cxlong </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxfileutils.html#gad1b34a4ae9f02012bf25f4431a783d1f">cx_path_max</a> (const cxchar *path)</td></tr>
<tr class="memdesc:gad1b34a4ae9f02012bf25f4431a783d1f"><td class="mdescLeft"> </td><td class="mdescRight">Get the maximum length of a path relative to the given directory. <a href="#gad1b34a4ae9f02012bf25f4431a783d1f">More...</a><br /></td></tr>
<tr class="separator:gad1b34a4ae9f02012bf25f4431a783d1f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga48dab751d6469555e885ecc7be2b667b"><td class="memItemLeft" align="right" valign="top">cxchar * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxfileutils.html#ga48dab751d6469555e885ecc7be2b667b">cx_path_alloc</a> (const char *path)</td></tr>
<tr class="memdesc:ga48dab751d6469555e885ecc7be2b667b"><td class="mdescLeft"> </td><td class="mdescRight">Allocate a buffer suitable for storing a relative pathname staring at a given directory. <a href="#ga48dab751d6469555e885ecc7be2b667b">More...</a><br /></td></tr>
<tr class="separator:ga48dab751d6469555e885ecc7be2b667b"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>The module provides a collection of useful file and file path related utility functions.</p>
<dl class="section user"><dt>Synopsis:</dt><dd><div class="fragment"><div class="line"><span class="preprocessor">#include <cxfileutils.h></span></div>
</div><!-- fragment --> </dd></dl>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga48dab751d6469555e885ecc7be2b667b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cxchar* cx_path_alloc </td>
<td>(</td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>path</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Allocate a buffer suitable for storing a relative pathname staring at a given directory. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">path</td><td>Directory name the relative path should start from.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Allocated buffer of appropriate size, or <code>NULL</code> in case of an error.</dd></dl>
<p>The function determines the maximum possible length of a relative path name when <em>path</em> is the current working directory. A buffer with the appropriate length for the relative pathname including the trailing zero. The argument <em>path</em> must be the name of an existing, or the function fails. The allocated buffer can be destroyed by calling <b><a class="el" href="group__cxmemory.html#ga535a509573c6617da8f0dccdb2710bc9" title="Memory block deallocation. ">cx_free()</a></b>.</p>
<p>IF the string "/" is used for <em>path</em> the returned buffer will have the maximum length possible for an absolute path supported by the system (but see the note for <b><a class="el" href="group__cxfileutils.html#gad1b34a4ae9f02012bf25f4431a783d1f" title="Get the maximum length of a path relative to the given directory. ">cx_path_max()</a></b> for pitfalls). </p>
<p>References <a class="el" href="group__cxmemory.html#gad6e24975b7161a4d3f5fe49fd84df740">cx_calloc()</a>, and <a class="el" href="group__cxfileutils.html#gad1b34a4ae9f02012bf25f4431a783d1f">cx_path_max()</a>.</p>
</div>
</div>
<a class="anchor" id="gad1b34a4ae9f02012bf25f4431a783d1f"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cxlong cx_path_max </td>
<td>(</td>
<td class="paramtype">const cxchar * </td>
<td class="paramname"><em>path</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the maximum length of a path relative to the given directory. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">path</td><td>Directory name.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Maximum path length.</dd></dl>
<p>The function returns the maximum length a relative path when <em>path</em> is the current working directory. To get the maximum possible length of an absolute path pass "/" for <em>path</em>, but see the note below. The size is determined through the <b>pathconf()</b> function, or if this is not available the maximum length is simply set to the ad hoc length of 4095 characters.</p>
<dl class="section note"><dt>Note</dt><dd>The maximum length of a pathname depends on the underlying filesystem. This means that the method to determine the maximum possible length of an absolute pathname might be incorrect if the root directory and the actual location of the file under consideration are located on different filesystems. </dd></dl>
<p>Referenced by <a class="el" href="group__cxfileutils.html#ga48dab751d6469555e885ecc7be2b667b">cx_path_alloc()</a>.</p>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.10
</small></address>
</body>
</html>
|