From d7040609d269e9dd78462f4d8092c7cd998581f6 Mon Sep 17 00:00:00 2001 From: Vladimir Glazounov Date: Wed, 17 Dec 2003 16:07:51 +0000 Subject: INTEGRATION: CWS geordi2q11 (1.30.106); FILE MERGED 2003/12/15 16:59:45 hr 1.30.106.1: #111934#: join CWS sal06 --- sal/inc/osl/file.hxx | 44 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) (limited to 'sal/inc') diff --git a/sal/inc/osl/file.hxx b/sal/inc/osl/file.hxx index 881240be51e1..d42086710a30 100644 --- a/sal/inc/osl/file.hxx +++ b/sal/inc/osl/file.hxx @@ -2,9 +2,9 @@ * * $RCSfile: file.hxx,v $ * - * $Revision: 1.30 $ + * $Revision: 1.31 $ * - * last change: $Author: vg $ $Date: 2003-05-13 12:27:55 $ + * last change: $Author: vg $ $Date: 2003-12-17 17:07:51 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -59,6 +59,7 @@ * ************************************************************************/ +/** @HTML */ #ifndef _OSL_FILE_HXX_ #define _OSL_FILE_HXX_ @@ -147,7 +148,8 @@ public: E_USERS = osl_File_E_USERS, E_OVERFLOW = osl_File_E_OVERFLOW, E_NOTREADY = osl_File_E_NOTREADY, - E_invalidError = osl_File_E_invalidError /* unmapped error: always last entry in enum! */ + E_invalidError = osl_File_E_invalidError, /* unmapped error: always last entry in enum! */ + E_TIMEDOUT = osl_File_E_TIMEDOUT }; @@ -1254,6 +1256,42 @@ public: return (RC) osl_readLine( _pData, reinterpret_cast(&aSeq) ); } + /** Synchronize the memory representation of a file with that on the physical medium. + + The function ensures that all modified data and attributes of the file associated with + the given file handle have been written to the physical medium. + In case the hard disk has a write cache enabled, the data may not really be on + permanent storage when osl_syncFile returns. + + @return +
+
E_None
+
On success
+
E_INVAL
+
The value of the input parameter is invalid
+
+

In addition to these error codes others may occur as well, for instance:


+
E_BADF
+
The file is not open for writing
+
E_IO
+
An I/O error occurred
+
E_NOSPC
+
There is no enough space on the target device
+
E_ROFS
+
The file is located on a read only file system
+
E_TIMEDOUT
+
A remote connection timed out. This may happen when a file is on a remote location
+ + + @see osl_syncFile() + @see open() + @see write() + */ + inline RC sync() const + { + OSL_PRECOND(_pData, "File::sync(): File not open"); + return (RC)osl_syncFile(_pData); + } /** Copy a file to a new destination. -- cgit