diff options
author | Oliver Bolte <obo@openoffice.org> | 2004-09-08 15:15:13 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2004-09-08 15:15:13 +0000 |
commit | 60b83607a6aecddc845bd05a4fe2b767cf06e1cd (patch) | |
tree | 6070495c6eaee711b9f2c6eb942faefebc57ad2f /sal/inc | |
parent | 45c9a95e5463519b45727e103494ba984125c4c4 (diff) |
INTEGRATION: CWS getfilesize1 (1.32.78); FILE MERGED
2004/08/25 07:30:41 cmc 1.32.78.2: #i33340# tweak the windows GetFileSize to be consistent with the unx one for the error case
2004/08/24 13:08:31 cmc 1.32.78.1: #i33340# as discussed with MHU add an explicit osl_getFileSize function to mirror osl_setFileSize as an alternative to seeking to end of files and back to get their length
Diffstat (limited to 'sal/inc')
-rw-r--r-- | sal/inc/osl/file.hxx | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/sal/inc/osl/file.hxx b/sal/inc/osl/file.hxx index c053a6247bdf..327638cc4644 100644 --- a/sal/inc/osl/file.hxx +++ b/sal/inc/osl/file.hxx @@ -2,9 +2,9 @@ * * $RCSfile: file.hxx,v $ * - * $Revision: 1.32 $ + * $Revision: 1.33 $ * - * last change: $Author: hr $ $Date: 2004-02-03 13:13:08 $ + * last change: $Author: obo $ $Date: 2004-09-08 16:15:13 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1017,6 +1017,7 @@ public: @see getPos() @see read() @see write() + @see getSize() @see setSize() */ @@ -1132,7 +1133,7 @@ public: Sets the file size of an open file. The file can be truncated or enlarged by the function. The position of the file pointer is not affeced by this function. - @param uSize [int] + @param uSize [in] New size in bytes. @return @@ -1150,6 +1151,31 @@ public: return (RC) osl_setFileSize( _pData, uSize ); } + /** Get the file size of an open file. + + Gets the file size of an open file. + The position of the file pointer is not affeced by this function. + + @param rSize [out] + Current size in bytes. + + @return + E_None on success + E_INVAL the format of the parameters was not valid + E_OVERFLOW the resulting file offset would be a value which cannot be represented correctly for regular files + + @see open() + @see setPos() + @see getSize() + @see setSize() + @see getStatus() + */ + + inline RC getSize( sal_uInt64 &rSize ) + { + return (RC) osl_getFileSize( _pData, &rSize ); + } + /** Read a number of bytes from a file. Reads a number of bytes from a file. The internal file pointer is |