📄 classpfilepath.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>PFilePath class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.18 --><center><a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center><hr><h1>PFilePath Class Reference</h1><code>#include <<a class="el" href="filepath_8h-source.html">filepath.h</a>></code><p><p>Inheritance diagram for PFilePath:<p><center><img src="classPFilePath.png" usemap="#PFilePath_map" border="0" alt=""></center><map name="PFilePath_map"><area href="classPString.html" alt="PString" shape="rect" coords="0,56,81,80"><area href="classPCharArray.html" alt="PCharArray" shape="rect" coords="0,0,81,24"></map><a href="classPFilePath-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0><tr><td></td></tr><tr><td colspan=2><br><h2>Public Methods</h2></td></tr><tr><td colspan="2"><div class="groupHeader">Construction</div></td></tr><tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classPFilePath.html#z135_0">PFilePath</a> ()</td></tr><tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classPFilePath.html#z135_1">PFilePath</a> (const char *cstr)</td></tr><tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classPFilePath.html#z135_2">PFilePath</a> (const <a class="el" href="classPString.html">PString</a> &str)</td></tr><tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classPFilePath.html#z135_3">PFilePath</a> (const PFilePath &path)</td></tr><tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classPFilePath.html#z135_4">PFilePath</a> (const char *prefix, const char *dir)</td></tr><tr><td nowrap align=right valign=top>PFilePath & </td><td valign=bottom><a class="el" href="classPFilePath.html#z135_5">operator=</a> (const PFilePath &path)</td></tr><tr><td nowrap align=right valign=top>PFilePath & </td><td valign=bottom><a class="el" href="classPFilePath.html#z135_6">operator=</a> (const <a class="el" href="classPString.html">PString</a> &str)</td></tr><tr><td nowrap align=right valign=top>PFilePath & </td><td valign=bottom><a class="el" href="classPFilePath.html#z135_7">operator=</a> (const char *cstr)</td></tr><tr><td colspan="2"><div class="groupHeader">Path addition functions</div></td></tr><tr><td nowrap align=right valign=top>PFilePath & </td><td valign=bottom><a class="el" href="classPFilePath.html#z137_0">operator+=</a> (const <a class="el" href="classPString.html">PString</a> &str)</td></tr><tr><td nowrap align=right valign=top>PFilePath & </td><td valign=bottom><a class="el" href="classPFilePath.html#z137_1">operator+=</a> (const char *cstr)</td></tr><tr><td nowrap align=right valign=top>PFilePath & </td><td valign=bottom><a class="el" href="classPFilePath.html#z137_2">operator+=</a> (char ch)</td></tr><tr><td colspan="2"><div class="groupHeader">Path decoding access functions</div></td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPFilePathString.html">PFilePathString</a> </td><td valign=bottom><a class="el" href="classPFilePath.html#z139_0">GetVolume</a> () const</td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPFilePathString.html">PFilePathString</a> </td><td valign=bottom><a class="el" href="classPFilePath.html#z139_1">GetPath</a> () const</td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPFilePathString.html">PFilePathString</a> </td><td valign=bottom><a class="el" href="classPFilePath.html#z139_2">GetTitle</a> () const</td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPFilePathString.html">PFilePathString</a> </td><td valign=bottom><a class="el" href="classPFilePath.html#z139_3">GetType</a> () const</td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPFilePathString.html">PFilePathString</a> </td><td valign=bottom><a class="el" href="classPFilePath.html#z139_4">GetFileName</a> () const</td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPDirectory.html">PDirectory</a> </td><td valign=bottom><a class="el" href="classPFilePath.html#z139_5">GetDirectory</a> () const</td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classPFilePath.html#z139_6">SetType</a> (const <a class="el" href="classPFilePathString.html">PFilePathString</a> &type)</td></tr><tr><td colspan=2><br><h2>Static Public Methods</h2></td></tr><tr><td colspan="2"><div class="groupHeader">Miscellaneous functions</div></td></tr><tr><td nowrap align=right valign=top>BOOL </td><td valign=bottom><a class="el" href="classPFilePath.html#z141_0">IsValid</a> (char c)</td></tr><tr><td nowrap align=right valign=top>BOOL </td><td valign=bottom><a class="el" href="classPFilePath.html#z141_1">IsValid</a> (const <a class="el" href="classPString.html">PString</a> &str)</td></tr><tr><td colspan=2><br><h2>Protected Methods</h2></td></tr><tr><td nowrap align=right valign=top>virtual void </td><td valign=bottom><a class="el" href="classPFilePath.html#b0">AssignContents</a> (const <a class="el" href="classPContainer.html">PContainer</a> &cont)</td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>This class describes a full description for a file on the particular platform. This will always uniquely identify the file on currently mounted volumes.<p>An empty string for a PFilePath indicates an illegal path.<p>The ancestor class is dependent on the platform. For file systems that are case sensitive, eg Unix, the ancestor is <a class="el" href="classPString.html#z231_1">PString</a>#. For other platforms, the ancestor class is PCaselessString#. <p><hr><h2>Constructor & Destructor Documentation</h2><a name="z135_0" doxytag="PFilePath::PFilePath"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> PINLINE PFilePath::PFilePath </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Create a file specification object. </td> </tr></table><a name="z135_1" doxytag="PFilePath::PFilePath"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> PFilePath::PFilePath </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const char * </td> <td class="mdname1" valign="top" nowrap> <em>cstr</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Create a file specification object with the specified file name.<p>The string passed in may be a full or partial specification for a file as determined by the platform. It is unusual for this to be a literal string, unless only the file title is specified, as that would be platform specific.<p>The partial file specification is translated into a canonical form which always absolutely references the file. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>cstr</em> </td><td>Partial C string for file name. </td></tr></table></dl> </td> </tr></table><a name="z135_2" doxytag="PFilePath::PFilePath"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> PFilePath::PFilePath </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classPString.html">PString</a> & </td> <td class="mdname1" valign="top" nowrap> <em>str</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Create a file specification object with the specified file name.<p>The string passed in may be a full or partial specification for a file as determined by the platform. It is unusual for this to be a literal string, unless only the file title is specified, as that would be platform specific.<p>The partial file specification is translated into a canonical form which always absolutely references the file. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>str</em> </td><td>Partial <a class="el" href="classPString.html">PString</a> for file name. </td></tr></table></dl> </td> </tr></table><a name="z135_3" doxytag="PFilePath::PFilePath"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> PINLINE PFilePath::PFilePath </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const PFilePath & </td> <td class="mdname1" valign="top" nowrap> <em>path</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Create a file specification object with the specified file name. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>path</em> </td><td>Previous path for file name. </td></tr></table></dl> </td> </tr></table><a name="z135_4" doxytag="PFilePath::PFilePath"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> PFilePath::PFilePath </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const char * </td> <td class="mdname" nowrap> <em>prefix</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>const char * </td> <td class="mdname" nowrap> <em>dir</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Create a file spec object with a generated temporary name. The first parameter is a prefix for the filename to which a unique number is appended. The second parameter is the directory in which the file is to be placed. If this is NULL a system standard directory is used. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>dir</em> </td><td>Prefix string for file title. Directory in which to place the file. </td></tr></table></dl> </td> </tr></table><hr><h2>Member Function Documentation</h2><a name="b0" doxytag="PFilePath::AssignContents"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual void PFilePath::AssignContents </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classPContainer.html">PContainer</a> & </td> <td class="mdname1" valign="top" nowrap> <em>cont</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [protected, virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p> </td> </tr></table><a name="z139_5" doxytag="PFilePath::GetDirectory"></a><p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -