tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

pr_getfileinfo.rst (1173B)


      1 PR_GetFileInfo
      2 ==============
      3 
      4 Gets information about a file with a specified pathname. File size is
      5 expressed as a 32-bit integer.
      6 
      7 
      8 Syntax
      9 ------
     10 
     11 .. code::
     12 
     13   #include <prio.h>
     14 
     15   PRStatus PR_GetFileInfo(
     16     const char *fn,
     17     PRFileInfo *info);
     18 
     19 
     20 Parameters
     21 ~~~~~~~~~~
     22 
     23 The function has the following parameters:
     24 
     25 ``fn``
     26   The pathname of the file to get information about.
     27 ``info``
     28   A pointer to a file information object (see :ref:`PRFileInfo`). On
     29   output, :ref:`PR_GetFileInfo` writes information about the given file to
     30   the file information object.
     31 
     32 
     33 Returns
     34 ~~~~~~~
     35 
     36 One of the following values:
     37 
     38 -  If the file information is successfully obtained, ``PR_SUCCESS``.
     39 -  If the file information is not successfully obtained, ``PR_FAILURE``.
     40 
     41 
     42 Description
     43 -----------
     44 
     45 :ref:`PR_GetFileInfo` stores information about the file with the specified
     46 pathname in the :ref:`PRFileInfo` structure pointed to by ``info``. The
     47 file size is returned as an unsigned 32-bit integer.
     48 
     49 
     50 See Also
     51 --------
     52 
     53 For the 64-bit version of this function, see :ref:`PR_GetFileInfo64`. To
     54 get equivalent information on a file that's already open, use
     55 :ref:`PR_GetOpenFileInfo`.