📄 classpfilepath.html
字号:
<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"> <a class="el" href="classPDirectory.html">PDirectory</a> PFilePath::GetDirectory </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>Get the the directory that the file is contained in. This may be identical to <a class="el" href="classPFilePath.html#z139_0">GetVolume()</a> + <a class="el" href="classPFilePath.html#z139_1">GetPath()</a># depending on the platform. eg for DOS file "C:\SRC\PWLIB\FRED.TXT" this would be "C:\SRC\PWLIB\".<p>Note that for Unix platforms, this returns the {\bf physical} path of the directory. That is all symlinks are resolved. Thus the directory returned may not be the same as the value of <a class="el" href="classPFilePath.html#z139_1">GetPath()</a>#.<p><dl compact><dt><b>Returns: </b></dt><dd> Directory that the file is contained in. </dl> </td> </tr></table><a name="z139_4" doxytag="PFilePath::GetFileName"></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"> <a class="el" href="classPFilePathString.html">PFilePathString</a> PFilePath::GetFileName </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>Get the actual directory entry name component of the full file specification. This may be identical to <a class="el" href="classPFilePath.html#z139_2">GetTitle()</a> + <a class="el" href="classPFilePath.html#z139_3">GetType()</a># or simply <a class="el" href="classPFilePath.html#z139_2">GetTitle()</a># depending on the platform. eg for DOS file "C:\SRC\PWLIB\FRED.TXT" this would be "FRED.TXT".<p><dl compact><dt><b>Returns: </b></dt><dd> string for the file name part of the file specification. </dl> </td> </tr></table><a name="z139_1" doxytag="PFilePath::GetPath"></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"> <a class="el" href="classPFilePathString.html">PFilePathString</a> PFilePath::GetPath </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>Get the directory path component of the full file specification. This will include leading and trailing directory separators. For example on DOS this could be "\SRC\PWLIB\", for Macintosh ":Source:PwLib:" and for Unix "/users/equivalence/src/pwlib/".<p><dl compact><dt><b>Returns: </b></dt><dd> string for the path part of the file specification. </dl> </td> </tr></table><a name="z139_2" doxytag="PFilePath::GetTitle"></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"> <a class="el" href="classPFilePathString.html">PFilePathString</a> PFilePath::GetTitle </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>Get the title component of the full file specification, eg for the DOS file "C:\SRC\PWLIB\FRED.DAT" this would be "FRED".<p><dl compact><dt><b>Returns: </b></dt><dd> string for the title part of the file specification. </dl> </td> </tr></table><a name="z139_3" doxytag="PFilePath::GetType"></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"> <a class="el" href="classPFilePathString.html">PFilePathString</a> PFilePath::GetType </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>Get the file type of the file. Note that on some platforms this may actually be part of the full name string. eg for DOS file "C:\SRC\PWLIB\FRED.TXT" this would be ".TXT" but on the Macintosh this might be "TEXT".<p>Note there are standard translations from file extensions, eg ".TXT" and some Macintosh file types, eg "TEXT".<p><dl compact><dt><b>Returns: </b></dt><dd> string for the type part of the file specification. </dl> </td> </tr></table><a name="z139_0" doxytag="PFilePath::GetVolume"></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"> <a class="el" href="classPFilePathString.html">PFilePathString</a> PFilePath::GetVolume </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>Get the drive/volume name component of the full file specification. This is very platform specific. For example in DOS & NT it is the drive letter followed by a colon ("C:"), for Macintosh it is the volume name ("Untitled") and for Unix it is empty ("").<p><dl compact><dt><b>Returns: </b></dt><dd> string for the volume name part of the file specification.. </dl> </td> </tr></table><a name="z141_1" doxytag="PFilePath::IsValid"></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"> BOOL PFilePath::IsValid </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><code> [static]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Test if all the characters are valid in a filename.<p><dl compact><dt><b>Returns: </b></dt><dd> TRUE if the character is valid for a filename. </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>str</em> </td><td>String to test for validity. </td></tr></table></dl> </td> </tr></table><a name="z141_0" doxytag="PFilePath::IsValid"></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"> BOOL PFilePath::IsValid </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">char </td> <td class="mdname1" valign="top" nowrap> <em>c</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [static]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Test if the character is valid in a filename.<p><dl compact><dt><b>Returns: </b></dt><dd> TRUE if the character is valid for a filename. </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>c</em> </td><td>Character to test for validity. </td></tr></table></dl> </td> </tr></table><a name="z137_2" doxytag="PFilePath::operator+="></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -