tor-browser

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

pr_getopenfileinfo.rst (1158B)


      1 PR_GetOpenFileInfo
      2 ==================
      3 
      4 Gets an open file's information. File size is expressed as a 32-bit
      5 integer.
      6 
      7 
      8 Syntax
      9 ------
     10 
     11 .. code::
     12 
     13   #include <prio.h>
     14 
     15   PRStatus PR_GetOpenFileInfo(
     16     PRFileDesc *fd,
     17     PRFileInfo *info);
     18 
     19 
     20 Parameters
     21 ~~~~~~~~~~
     22 
     23 The function has the following parameters:
     24 
     25 ``fd``
     26   A pointer to a :ref:`PRFileDesc` object for an open file.
     27 ``info``
     28   A pointer to a :ref:`PRFileInfo` object. On output, information about
     29   the given file is written into the file information object.
     30 
     31 
     32 Returns
     33 ~~~~~~~
     34 
     35 The function returns one of the following values:
     36 
     37 -  If file information is successfully obtained, ``PR_SUCCESS``.
     38 -  If file information is not successfully obtained, ``PR_FAILURE``.
     39 
     40 
     41 Description
     42 -----------
     43 
     44 :ref:`PR_GetOpenFileInfo` obtains the file type (normal file, directory, or
     45 other), file size (as a 32-bit integer), and the file creation and
     46 modification times of the open file represented by the file descriptor.
     47 
     48 
     49 See Also
     50 --------
     51 
     52 For the 64-bit version of this function, see :ref:`PR_GetOpenFileInfo64`.
     53 To get equivalent information on a file that's not already open, use
     54 :ref:`PR_GetFileInfo`.