<html> <head> <title>Methods of Class FileBase</title> <link rel="stylesheet" type="text/css" href="../../../cpp.css"> </head> <body> <div id="adc-cppref"> <a name="_top_"> </a><table class="navimain" border="0" cellpadding="1" cellspacing="0"> <tr align="center" valign="top"> <td class="navimain"> <a href="../../../index.html">Overview</a> </td> <td class="navimain"> <a href="../index.html">Namespace</a> </td> <td class="navimain"> <a href="../c-FileBase.html">Class</a> </td> <td class="navimain"> <a href="../../../index-files/index-1.html">Index</a> </td> <td class="navimain"> <a href="../../../help.html">Help</a> </td> </tr> </table> <table class="navisub" cellpadding="0" cellspacing="3"></table> <hr> <div class="title"><h2>Methods of Class FileBase</h2> </div><hr> <dl class="member"> <dt class="member"><a name="getCanonicalName-271"> </a>getCanonicalName</dt> <dd class="member"><dl> <dt class="simple">static <a href="e-RC.html">RC</a> <strong>getCanonicalName</strong>(</dt> <dd><table class="param-table"> <tr> <td>const ::rtl::<a href="../../rtl/c-OUString.html">OUString</a> & </td> <td> ustrRequestedURL,</td> </tr> <tr> <td>::rtl::<a href="../../rtl/c-OUString.html">OUString</a> &</td> <td>ustrValidURL );</td> </tr> </table> </dd> </dl> <br> </dd> <dd class="member"><table class="flag-table" border="1" cellspacing="0"> <tr> <td width="12%" class="flagname">virtual</td> <td width="12%" class="flagname">abstract</td> <td width="12%" class="flagname">const</td> <td width="12%" class="flagname">volatile</td> <td width="12%" class="flagname">template</td> <td width="12%" class="flagname">static</td> <td width="12%" class="flagname">inline</td> <td width="12%" class="flagname">C-linkage</td> </tr> <tr> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagyes">YES</td> <td class="flagyes">YES</td> <td class="flagno">NO</td> </tr> </table> <br> </dd> <dd class="member"><dl> <dt>Summary</dt> <dd>Determine a valid unused canonical name for a requested name. </dd> <dt>Description</dt> <dd> Determines a valid unused canonical name for a requested name. Depending on the Operating System and the File System the illegal characters are replaced by valid ones. If a file or directory with the requested name already exists a new name is generated following the common rules on the actual Operating System and File System. </dd> <dt>Parameters</dt> <dd><table border="0" width="100%" cellpadding="3" cellspacing="0" class="expl-table"> <tr> <td width="15%" style="vertical-align:top; font-weight:bold">ustrRequestedURL</td> <td><pre> Requested name of a file or directory. </pre></td> </tr> <tr> <td width="15%" style="vertical-align:top; font-weight:bold">pustrValidURL</td> <td><pre> On success receives a name which is unused and valid on the actual Operating System and File System. </pre></td> </tr> </table> </dd> <dt>Return</dt> <dd> E_None on success E_INVAL the format of the parameters was not valid </dd> <dt>See Also</dt> <dd>DirectoryItem::getFileStatus() <br> </dd> </dl> </dd> </dl> <hr> <dl class="member"> <dt class="member"><a name="getAbsoluteFileURL-272"> </a>getAbsoluteFileURL</dt> <dd class="member"><dl> <dt class="simple">static <a href="e-RC.html">RC</a> <strong>getAbsoluteFileURL</strong>(</dt> <dd><table class="param-table"> <tr> <td>const ::rtl::<a href="../../rtl/c-OUString.html">OUString</a> & </td> <td> ustrBaseDirectoryURL,</td> </tr> <tr> <td>const ::rtl::<a href="../../rtl/c-OUString.html">OUString</a> &</td> <td>ustrRelativeFileURL,</td> </tr> <tr> <td>::rtl::<a href="../../rtl/c-OUString.html">OUString</a> &</td> <td>ustrAbsoluteFileURL );</td> </tr> </table> </dd> </dl> <br> </dd> <dd class="member"><table class="flag-table" border="1" cellspacing="0"> <tr> <td width="12%" class="flagname">virtual</td> <td width="12%" class="flagname">abstract</td> <td width="12%" class="flagname">const</td> <td width="12%" class="flagname">volatile</td> <td width="12%" class="flagname">template</td> <td width="12%" class="flagname">static</td> <td width="12%" class="flagname">inline</td> <td width="12%" class="flagname">C-linkage</td> </tr> <tr> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagyes">YES</td> <td class="flagyes">YES</td> <td class="flagno">NO</td> </tr> </table> <br> </dd> <dd class="member"><dl> <dt>Summary</dt> <dd>Convert a path relative to a given directory into an full qualified file URL. </dd> <dt>Description</dt> <dd> Convert a path relative to a given directory into an full qualified file URL. The function resolves symbolic links if possible and path ellipses, so on success the resulting absolute path is fully resolved. </dd> <dt>Parameters</dt> <dd><table border="0" width="100%" cellpadding="3" cellspacing="0" class="expl-table"> <tr> <td width="15%" style="vertical-align:top; font-weight:bold">ustrBaseDirectoryURL</td> <td><pre> Base directory URL to which the relative path is related to. </pre></td> </tr> <tr> <td width="15%" style="vertical-align:top; font-weight:bold">ustrRelativeFileURL</td> <td><pre> An URL of a file or directory relative to the directory path specified by ustrBaseDirectoryURL or an absolute path. If ustrRelativeFileURL denotes an absolute path ustrBaseDirectoryURL will be ignored. </pre></td> </tr> <tr> <td width="15%" style="vertical-align:top; font-weight:bold">ustrAbsoluteFileURL</td> <td><pre> On success it receives the full qualified absoulte file URL. </pre></td> </tr> </table> </dd> <dt>Return</dt> <dd> E_None on success E_INVAL the format of the parameters was not valid E_NOMEM not enough memory for allocating structures E_NOTDIR not a directory E_ACCES permission denied E_NOENT no such file or directory E_NAMETOOLONG file name too long E_OVERFLOW value too large for defined data type E_FAULT bad address E_INTR function call was interrupted E_LOOP too many symbolic links encountered E_MULTIHOP multihop attempted E_NOLINK link has been severed </dd> <dt>See Also</dt> <dd>DirectoryItem::getFileStatus() <br> </dd> </dl> </dd> </dl> <hr> <dl class="member"> <dt class="member"><a name="getSystemPathFromFileURL-273"> </a>getSystemPathFromFileURL</dt> <dd class="member"><dl> <dt class="simple">static <a href="e-RC.html">RC</a> <strong>getSystemPathFromFileURL</strong>(</dt> <dd><table class="param-table"> <tr> <td>const ::rtl::<a href="../../rtl/c-OUString.html">OUString</a> & </td> <td> ustrFileURL,</td> </tr> <tr> <td>::rtl::<a href="../../rtl/c-OUString.html">OUString</a> &</td> <td>ustrSystemPath );</td> </tr> </table> </dd> </dl> <br> </dd> <dd class="member"><table class="flag-table" border="1" cellspacing="0"> <tr> <td width="12%" class="flagname">virtual</td> <td width="12%" class="flagname">abstract</td> <td width="12%" class="flagname">const</td> <td width="12%" class="flagname">volatile</td> <td width="12%" class="flagname">template</td> <td width="12%" class="flagname">static</td> <td width="12%" class="flagname">inline</td> <td width="12%" class="flagname">C-linkage</td> </tr> <tr> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagyes">YES</td> <td class="flagyes">YES</td> <td class="flagno">NO</td> </tr> </table> <br> </dd> <dd class="member"><dl> <dt>Summary</dt> <dd>Convert a file URL into a system dependend path. </dd> <dt>Parameters</dt> <dd><table border="0" width="100%" cellpadding="3" cellspacing="0" class="expl-table"> <tr> <td width="15%" style="vertical-align:top; font-weight:bold">ustrFileURL</td> <td><pre> A File URL. </pre></td> </tr> <tr> <td width="15%" style="vertical-align:top; font-weight:bold">ustrSystemPath</td> <td><pre> On success it receives the system path. </pre></td> </tr> </table> </dd> <dt>Return</dt> <dd> E_None on success E_INVAL the format of the parameters was not valid </dd> <dt>See Also</dt> <dd><a href="o.html#getFileURLFromSystemPath-274">getFileURLFromSystemPath()</a> <br> </dd> </dl> </dd> </dl> <hr> <dl class="member"> <dt class="member"><a name="getFileURLFromSystemPath-274"> </a>getFileURLFromSystemPath</dt> <dd class="member"><dl> <dt class="simple">static <a href="e-RC.html">RC</a> <strong>getFileURLFromSystemPath</strong>(</dt> <dd><table class="param-table"> <tr> <td>const ::rtl::<a href="../../rtl/c-OUString.html">OUString</a> & </td> <td> ustrSystemPath,</td> </tr> <tr> <td>::rtl::<a href="../../rtl/c-OUString.html">OUString</a> &</td> <td>ustrFileURL );</td> </tr> </table> </dd> </dl> <br> </dd> <dd class="member"><table class="flag-table" border="1" cellspacing="0"> <tr> <td width="12%" class="flagname">virtual</td> <td width="12%" class="flagname">abstract</td> <td width="12%" class="flagname">const</td> <td width="12%" class="flagname">volatile</td> <td width="12%" class="flagname">template</td> <td width="12%" class="flagname">static</td> <td width="12%" class="flagname">inline</td> <td width="12%" class="flagname">C-linkage</td> </tr> <tr> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagyes">YES</td> <td class="flagyes">YES</td> <td class="flagno">NO</td> </tr> </table> <br> </dd> <dd class="member"><dl> <dt>Summary</dt> <dd>Convert a system dependend path into a file URL. </dd> <dt>Parameters</dt> <dd><table border="0" width="100%" cellpadding="3" cellspacing="0" class="expl-table"> <tr> <td width="15%" style="vertical-align:top; font-weight:bold">ustrSystemPath</td> <td><pre> A System dependent path of a file or directory. </pre></td> </tr> <tr> <td width="15%" style="vertical-align:top; font-weight:bold">ustrFileURL</td> <td><pre> On success it receives the file URL. </pre></td> </tr> </table> </dd> <dt>Return</dt> <dd> E_None on success E_INVAL the format of the parameters was not valid </dd> <dt>See Also</dt> <dd><a href="o.html#getSystemPathFromFileURL-273">getSystemPathFromFileURL()</a> <br> </dd> </dl> </dd> </dl> <hr> <dl class="member"> <dt class="member"><a name="searchFileURL-275"> </a>searchFileURL</dt> <dd class="member"><dl> <dt class="simple">static <a href="e-RC.html">RC</a> <strong>searchFileURL</strong>(</dt> <dd><table class="param-table"> <tr> <td>const ::rtl::<a href="../../rtl/c-OUString.html">OUString</a> & </td> <td> ustrFileName,</td> </tr> <tr> <td>const ::rtl::<a href="../../rtl/c-OUString.html">OUString</a> &</td> <td>ustrSearchPath,</td> </tr> <tr> <td>::rtl::<a href="../../rtl/c-OUString.html">OUString</a> &</td> <td>ustrFileURL );</td> </tr> </table> </dd> </dl> <br> </dd> <dd class="member"><table class="flag-table" border="1" cellspacing="0"> <tr> <td width="12%" class="flagname">virtual</td> <td width="12%" class="flagname">abstract</td> <td width="12%" class="flagname">const</td> <td width="12%" class="flagname">volatile</td> <td width="12%" class="flagname">template</td> <td width="12%" class="flagname">static</td> <td width="12%" class="flagname">inline</td> <td width="12%" class="flagname">C-linkage</td> </tr> <tr> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagyes">YES</td> <td class="flagyes">YES</td> <td class="flagno">NO</td> </tr> </table> <br> </dd> <dd class="member"><dl> <dt>Summary</dt> <dd>Searche a full qualified system path or a file URL. </dd> <dt>Parameters</dt> <dd><table border="0" width="100%" cellpadding="3" cellspacing="0" class="expl-table"> <tr> <td width="15%" style="vertical-align:top; font-weight:bold">ustrFileName</td> <td><pre> A system dependent path, a file URL, a file or relative directory </pre></td> </tr> <tr> <td width="15%" style="vertical-align:top; font-weight:bold">ustrSearchPath</td> <td><pre> A list of system paths, in which a given file has to be searched. The Notation of a path list is system dependend, e.g. on UNIX system "/usr/bin:/bin" and on Windows "C:\BIN;C:\BATCH". These paths are only for the search of a file or a relative path, otherwise it will be ignored. If ustrSearchPath is NULL or while using the search path the search failed, the function searches for a matching file in all system directories and in the directories listed in the PATH environment variable. The value of an environment variable should be used (e.g. LD_LIBRARY_PATH) if the caller is not aware of the Operating System and so doesn't know which path list delimiter to use. </pre></td> </tr> <tr> <td width="15%" style="vertical-align:top; font-weight:bold">ustrFileURL</td> <td><pre> On success it receives the full qualified file URL. </pre></td> </tr> </table> </dd> <dt>Return</dt> <dd> E_None on success E_INVAL the format of the parameters was not valid E_NOTDIR not a directory E_NOENT no such file or directory not found </dd> <dt>See Also</dt> <dd><a href="o.html#getFileURLFromSystemPath-274">getFileURLFromSystemPath()</a> <br> <a href="o.html#getSystemPathFromFileURL-273">getSystemPathFromFileURL()</a> <br> </dd> </dl> </dd> </dl> <hr> <dl class="member"> <dt class="member"><a name="getTempDirURL-276"> </a>getTempDirURL</dt> <dd class="member"><dl> <dt class="simple">static <a href="e-RC.html">RC</a> <strong>getTempDirURL</strong>(</dt> <dd><table class="param-table"> <tr> <td>::rtl::<a href="../../rtl/c-OUString.html">OUString</a> & </td> <td> ustrTempDirURL );</td> </tr> </table> </dd> </dl> <br> </dd> <dd class="member"><table class="flag-table" border="1" cellspacing="0"> <tr> <td width="12%" class="flagname">virtual</td> <td width="12%" class="flagname">abstract</td> <td width="12%" class="flagname">const</td> <td width="12%" class="flagname">volatile</td> <td width="12%" class="flagname">template</td> <td width="12%" class="flagname">static</td> <td width="12%" class="flagname">inline</td> <td width="12%" class="flagname">C-linkage</td> </tr> <tr> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagyes">YES</td> <td class="flagyes">YES</td> <td class="flagno">NO</td> </tr> </table> <br> </dd> <dd class="member"><dl> <dt>Summary</dt> <dd>Retrieves the file URL of the system's temporary directory path. </dd> <dt>Parameters</dt> <dd><table border="0" width="100%" cellpadding="3" cellspacing="0" class="expl-table"> <tr> <td width="15%" style="vertical-align:top; font-weight:bold">ustrTempDirURL[out]</td> <td><pre> On success receives the URL of system's temporary directory path. </pre></td> </tr> </table> </dd> <dt>Return</dt> <dd> E_None on success E_NOENT no such file or directory not found </dd> </dl> </dd> </dl> <hr> <dl class="member"> <dt class="member"><a name="createTempFile-277"> </a>createTempFile</dt> <dd class="member"><dl> <dt class="simple">static <a href="e-RC.html">RC</a> <strong>createTempFile</strong>(</dt> <dd><table class="param-table"> <tr> <td>::rtl::<a href="../../rtl/c-OUString.html">OUString</a> * </td> <td> pustrDirectoryURL,</td> </tr> <tr> <td><a href="../../t-oslFileHandle.html">oslFileHandle</a> *</td> <td>pHandle,</td> </tr> <tr> <td>::rtl::<a href="../../rtl/c-OUString.html">OUString</a> *</td> <td>pustrTempFileURL );</td> </tr> </table> </dd> </dl> <br> </dd> <dd class="member"><table class="flag-table" border="1" cellspacing="0"> <tr> <td width="12%" class="flagname">virtual</td> <td width="12%" class="flagname">abstract</td> <td width="12%" class="flagname">const</td> <td width="12%" class="flagname">volatile</td> <td width="12%" class="flagname">template</td> <td width="12%" class="flagname">static</td> <td width="12%" class="flagname">inline</td> <td width="12%" class="flagname">C-linkage</td> </tr> <tr> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagno">NO</td> <td class="flagyes">YES</td> <td class="flagyes">YES</td> <td class="flagno">NO</td> </tr> </table> <br> </dd> <dd class="member"><dl> <dt>Description</dt> <dd>Creates a temporary file in the directory provided by the caller or the directory returned by getTempDirURL. Under UNIX Operating Systems the file will be created with read and write access for the user exclusively. If the caller requests only a handle to the open file but not the name of it, the file will be automatically removed on close else the caller is responsible for removing the file on success.<br><br> </dd> <dt>Parameters</dt> <dd><table border="0" width="100%" cellpadding="3" cellspacing="0" class="expl-table"> <tr> <td width="15%" style="vertical-align:top; font-weight:bold">pustrDirectoryURL</td> <td><pre> Specifies the full qualified URL where the temporary file should be created. If pustrDirectoryURL is 0 the path returned by osl_getTempDirURL will be used. </pre></td> </tr> <tr> <td width="15%" style="vertical-align:top; font-weight:bold">pHandle</td> <td><pre> On success receives a handle to the open file. If pHandle is 0 the file will be closed on return, in this case pustrTempFileURL must not be 0. </pre></td> </tr> <tr> <td width="15%" style="vertical-align:top; font-weight:bold">pustrTempFileURL</td> <td><pre> On success receives the full qualified URL of the temporary file. If pustrTempFileURL is 0 the file will be automatically removed on close, in this case pHandle must not be 0. If pustrTempFileURL is not 0 the caller receives the name of the created file and is responsible for removing the file. </pre></td> </tr> </table> </dd> <dt>Return</dt> <dd> E_None on success E_INVAL the format of the parameter is invalid E_NOMEM not enough memory for allocating structures E_ACCES Permission denied E_NOENT No such file or directory E_NOTDIR Not a directory E_ROFS Read-only file system E_NOSPC No space left on device E_DQUOT Quota exceeded </dd> <dt>See Also</dt> <dd><a href="o.html#getTempDirURL-276">getTempDirURL()</a> <br> </dd> </dl> </dd> </dl> <hr> <a href="#_top_" class="objchapter">Top of Page</a><hr size="3"><p class="copyright" align="center">Copyright © 2008 Sun Microsystems, Inc.</p> </div> <!-- id="adc-cppref" --> </body> </html>