LibreOffice
LibreOffice 5.4 SDK C/C++ API Reference
file.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #ifndef INCLUDED_OSL_FILE_HXX
21 #define INCLUDED_OSL_FILE_HXX
22 
23 #include <sal/config.h>
24 
25 #include <string.h>
26 
27 #include <cassert>
28 #include <cstddef>
29 
30 #include <sal/log.hxx>
31 #include <osl/time.h>
32 #include <rtl/ustring.hxx>
33 
34 #include <osl/file.h>
35 #include <osl/diagnose.h>
36 #include <rtl/byteseq.hxx>
37 
38 #include <stdio.h>
39 
40 namespace osl
41 {
42 
43 
51 class FileBase
52 {
53 public:
54 
55  enum RC {
56  E_None = osl_File_E_None, //< on success
57  E_PERM = osl_File_E_PERM, //< operation not permitted
58  E_NOENT = osl_File_E_NOENT, //< no such file or directory
59  E_SRCH = osl_File_E_SRCH, //< no process matches the PID
60  E_INTR = osl_File_E_INTR, //< function call was interrupted
61  E_IO = osl_File_E_IO, //< I/O error occured
62  E_NXIO = osl_File_E_NXIO, //< no such device or address
63  E_2BIG = osl_File_E_2BIG, //< argument list too long
64  E_NOEXEC = osl_File_E_NOEXEC, //< invalid executable file format
65  E_BADF = osl_File_E_BADF, //< bad file descriptor
66  E_CHILD = osl_File_E_CHILD, //< there are no child processes
67  E_AGAIN = osl_File_E_AGAIN, //< resource temp unavailable, try again later
68  E_NOMEM = osl_File_E_NOMEM, //< no memory available
69  E_ACCES = osl_File_E_ACCES, //< file permissions do not allow operation
70  E_FAULT = osl_File_E_FAULT, //< bad address; an invalid pointer detected
71  E_BUSY = osl_File_E_BUSY, //< resource busy
72  E_EXIST = osl_File_E_EXIST, //< file exists where should only be created
73  E_XDEV = osl_File_E_XDEV, //< improper link across file systems detected
74  E_NODEV = osl_File_E_NODEV, //< wrong device type specified
75  E_NOTDIR = osl_File_E_NOTDIR, //< file isn't a directory where one is needed
76  E_ISDIR = osl_File_E_ISDIR, //< file is a directory, invalid operation
77  E_INVAL = osl_File_E_INVAL, //< invalid argument to library function
78  E_NFILE = osl_File_E_NFILE, //< too many distinct file openings
79  E_MFILE = osl_File_E_MFILE, //< process has too many distinct files open
80  E_NOTTY = osl_File_E_NOTTY, //< inappropriate I/O control operation
81  E_FBIG = osl_File_E_FBIG, //< file too large
82  E_NOSPC = osl_File_E_NOSPC, //< no space left on device, write failed
83  E_SPIPE = osl_File_E_ROFS, //< invalid seek operation (such as on pipe)
84  E_ROFS = osl_File_E_SPIPE, //< illegal modification to read-only filesystem
85  E_MLINK = osl_File_E_MLINK, //< too many links to file
86  E_PIPE = osl_File_E_PIPE, //< broken pipe; no process reading from other end of pipe
87  E_DOM = osl_File_E_DOM, //< domain error (mathematical error)
88  E_RANGE = osl_File_E_RANGE, //< range error (mathematical error)
89  E_DEADLK = osl_File_E_DEADLK, //< deadlock avoided
90  E_NAMETOOLONG = osl_File_E_NAMETOOLONG, //< filename too long
91  E_NOLCK = osl_File_E_NOLCK, //< no locks available
92  E_NOSYS = osl_File_E_NOSYS, //< function not implemented
93  E_NOTEMPTY = osl_File_E_NOTEMPTY, //< directory not empty
94  E_LOOP = osl_File_E_LOOP, //< too many levels of symbolic links found during name lookup
95  E_ILSEQ = osl_File_E_ILSEQ, //< invalid or incomplete byte sequence of multibyte char found
96  E_NOLINK = osl_File_E_NOLINK, //< link has been severed
97  E_MULTIHOP = osl_File_E_MULTIHOP, //< remote resource is not directly available
98  E_USERS = osl_File_E_USERS, //< file quote system is confused as there are too many users
99  E_OVERFLOW = osl_File_E_OVERFLOW, //< value too large for defined data type
100  E_NOTREADY = osl_File_E_NOTREADY, //< device not ready
101  E_invalidError = osl_File_E_invalidError, //< unmapped error: always last entry in enum!
102  E_TIMEDOUT = osl_File_E_TIMEDOUT, //< socket operation timed out
104  };
105 
106 
107 public:
108 
129  static RC getCanonicalName( const ::rtl::OUString& ustrRequestedURL, ::rtl::OUString& ustrValidURL )
130  {
131  return static_cast< RC >( osl_getCanonicalName( ustrRequestedURL.pData, &ustrValidURL.pData ) );
132  }
133 
168  static RC getAbsoluteFileURL( const ::rtl::OUString& ustrBaseDirectoryURL, const ::rtl::OUString& ustrRelativeFileURL, ::rtl::OUString& ustrAbsoluteFileURL )
169  {
170  return static_cast< RC >( osl_getAbsoluteFileURL( ustrBaseDirectoryURL.pData, ustrRelativeFileURL.pData, &ustrAbsoluteFileURL.pData ) );
171  }
172 
187  static RC getSystemPathFromFileURL( const ::rtl::OUString& ustrFileURL, ::rtl::OUString& ustrSystemPath )
188  {
189  return static_cast< RC >( osl_getSystemPathFromFileURL( ustrFileURL.pData, &ustrSystemPath.pData ) );
190  }
191 
206  static RC getFileURLFromSystemPath( const ::rtl::OUString& ustrSystemPath, ::rtl::OUString& ustrFileURL )
207  {
208  return static_cast< RC >( osl_getFileURLFromSystemPath( ustrSystemPath.pData, &ustrFileURL.pData ) );
209  }
210 
238  static RC searchFileURL( const ::rtl::OUString& ustrFileName, const ::rtl::OUString& ustrSearchPath, ::rtl::OUString& ustrFileURL )
239  {
240  return static_cast< RC >( osl_searchFileURL( ustrFileName.pData, ustrSearchPath.pData, &ustrFileURL.pData ) );
241  }
242 
252  static RC getTempDirURL( ::rtl::OUString& ustrTempDirURL )
253  {
254  return static_cast< RC >( osl_getTempDirURL( &ustrTempDirURL.pData ) );
255  }
256 
305  ::rtl::OUString* pustrDirectoryURL,
306  oslFileHandle* pHandle,
307  ::rtl::OUString* pustrTempFileURL)
308  {
309  rtl_uString* pustr_dir_url = pustrDirectoryURL ? pustrDirectoryURL->pData : NULL;
310  rtl_uString** ppustr_tmp_file_url = pustrTempFileURL ? &pustrTempFileURL->pData : NULL;
311 
312  return static_cast< RC >( osl_createTempFile(pustr_dir_url, pHandle, ppustr_tmp_file_url) );
313  }
314 };
315 
316 
322 class VolumeDevice : public FileBase
323 {
324  oslVolumeDeviceHandle _aHandle;
325 
326 public:
327 
331  VolumeDevice() : _aHandle( NULL )
332  {
333  }
334 
341  VolumeDevice( const VolumeDevice & rDevice )
342  {
343  _aHandle = rDevice._aHandle;
344  if ( _aHandle )
345  osl_acquireVolumeDeviceHandle( _aHandle );
346  }
347 
352  {
353  if ( _aHandle )
354  osl_releaseVolumeDeviceHandle( _aHandle );
355  }
356 
363  VolumeDevice & operator =( const VolumeDevice & rDevice )
364  {
365  oslVolumeDeviceHandle newHandle = rDevice._aHandle;
366 
367  if ( newHandle )
368  osl_acquireVolumeDeviceHandle( newHandle );
369 
370  if ( _aHandle )
371  osl_releaseVolumeDeviceHandle( _aHandle );
372 
373  _aHandle = newHandle;
374 
375  return *this;
376  }
377 
384  {
385  rtl::OUString aPath;
386  osl_getVolumeDeviceMountPath( _aHandle, &aPath.pData );
387  return aPath;
388  }
389 
390  friend class VolumeInfo;
391 };
392 
393 
394 class Directory;
395 
405 {
406  oslVolumeInfo _aInfo;
407  sal_uInt32 _nMask;
408  VolumeDevice _aDevice;
409 
414 
418  VolumeInfo& operator = ( VolumeInfo& ) SAL_DELETED_FUNCTION;
419 
420 public:
421 
428  VolumeInfo( sal_uInt32 nMask )
429  : _nMask( nMask )
430  {
431  memset( &_aInfo, 0, sizeof( oslVolumeInfo ));
432  _aInfo.uStructSize = sizeof( oslVolumeInfo );
433  _aInfo.pDeviceHandle = &_aDevice._aHandle;
434  }
435 
440  {
441  if( _aInfo.ustrFileSystemName )
443  }
444 
453  bool isValid( sal_uInt32 nMask ) const
454  {
455  return ( nMask & _aInfo.uValidFields ) == nMask;
456  }
457 
464  bool getRemoteFlag() const
465  {
466  return (_aInfo.uAttributes & osl_Volume_Attribute_Remote) != 0;
467  }
468 
475  bool getRemoveableFlag() const
476  {
477  return (_aInfo.uAttributes & osl_Volume_Attribute_Removeable) != 0;
478  }
479 
486  bool getCompactDiscFlag() const
487  {
488  return (_aInfo.uAttributes & osl_Volume_Attribute_CompactDisc) != 0;
489  }
490 
497  bool getFloppyDiskFlag() const
498  {
499  return (_aInfo.uAttributes & osl_Volume_Attribute_FloppyDisk) != 0;
500  }
501 
508  bool getFixedDiskFlag() const
509  {
510  return (_aInfo.uAttributes & osl_Volume_Attribute_FixedDisk) != 0;
511  }
512 
519  bool getRAMDiskFlag() const
520  {
521  return (_aInfo.uAttributes & osl_Volume_Attribute_RAMDisk) != 0;
522  }
523 
531  sal_uInt64 getTotalSpace() const
532  {
533  return _aInfo.uTotalSpace;
534  }
535 
543  sal_uInt64 getFreeSpace() const
544  {
545  return _aInfo.uFreeSpace;
546  }
547 
555  sal_uInt64 getUsedSpace() const
556  {
557  return _aInfo.uUsedSpace;
558  }
559 
567  sal_uInt32 getMaxNameLength() const
568  {
569  return _aInfo.uMaxNameLength;
570  }
571 
579  sal_uInt32 getMaxPathLength() const
580  {
581  return _aInfo.uMaxPathLength;
582  }
583 
592  {
594  }
595 
596 
605  {
606  return _aDevice;
607  }
608 
616  {
617  return (_aInfo.uAttributes & osl_Volume_Attribute_Case_Sensitive) != 0;
618  }
619 
628  {
630  }
631 
632  friend class Directory;
633 };
634 
635 
636 class DirectoryItem;
637 
644 {
645  oslFileStatus _aStatus;
646  sal_uInt32 _nMask;
647 
652 
656  FileStatus& operator = ( FileStatus& ) SAL_DELETED_FUNCTION;
657 
658 public:
659 
660  enum Type {
669  };
670 
676  FileStatus(sal_uInt32 nMask)
677  : _nMask(nMask)
678  {
679  memset(&_aStatus, 0, sizeof(_aStatus));
680  _aStatus.uStructSize = sizeof(_aStatus);
681  }
682 
686  {
687  if ( _aStatus.ustrFileURL )
688  rtl_uString_release( _aStatus.ustrFileURL );
689  if ( _aStatus.ustrLinkTargetURL )
691  if ( _aStatus.ustrFileName )
692  rtl_uString_release( _aStatus.ustrFileName );
693  }
694 
704  bool isValid( sal_uInt32 nMask ) const
705  {
706  return ( nMask & _aStatus.uValidFields ) == nMask;
707  }
708 
715  {
716  SAL_INFO_IF(
717  !isValid(osl_FileStatus_Mask_Type), "sal.osl",
718  "no FileStatus Type determined");
719  return isValid(osl_FileStatus_Mask_Type)
720  ? static_cast< Type >(_aStatus.eType) : Unknown;
721  }
722 
732  bool isDirectory() const
733  {
734  return ( getFileType() == Directory || getFileType() == Volume );
735  }
736 
747  bool isRegular() const
748  {
749  return ( getFileType() == Regular );
750  }
751 
760  bool isLink() const
761  {
762  return ( getFileType() == Link );
763  }
764 
771  sal_uInt64 getAttributes() const
772  {
773  SAL_INFO_IF(
774  !isValid(osl_FileStatus_Mask_Attributes), "sal.osl",
775  "no FileStatus Attributes determined");
776  return _aStatus.uAttributes;
777  }
778 
787  {
788  SAL_INFO_IF(
789  !isValid(osl_FileStatus_Mask_CreationTime), "sal.osl",
790  "no FileStatus CreationTime determined");
791  return _aStatus.aCreationTime;
792  }
793 
802  {
803  SAL_INFO_IF(
804  !isValid(osl_FileStatus_Mask_AccessTime), "sal.osl",
805  "no FileStatus AccessTime determined");
806  return _aStatus.aAccessTime;
807  }
808 
817  {
818  SAL_INFO_IF(
819  !isValid(osl_FileStatus_Mask_ModifyTime), "sal.osl",
820  "no FileStatus ModifyTime determined");
821  return _aStatus.aModifyTime;
822  }
823 
830  sal_uInt64 getFileSize() const
831  {
832  SAL_INFO_IF(
833  !isValid(osl_FileStatus_Mask_FileSize), "sal.osl",
834  "no FileStatus FileSize determined");
835  return _aStatus.uFileSize;
836  }
837 
845  {
846  SAL_INFO_IF(
847  !isValid(osl_FileStatus_Mask_FileName), "sal.osl",
848  "no FileStatus FileName determined");
849  return isValid(osl_FileStatus_Mask_FileName)
850  ? rtl::OUString(_aStatus.ustrFileName) : rtl::OUString();
851  }
852 
853 
862  {
863  SAL_INFO_IF(
864  !isValid(osl_FileStatus_Mask_FileURL), "sal.osl",
865  "no FileStatus FileURL determined");
866  return isValid(osl_FileStatus_Mask_FileURL)
867  ? rtl::OUString(_aStatus.ustrFileURL) : rtl::OUString();
868  }
869 
878  {
879  SAL_INFO_IF(
880  !isValid(osl_FileStatus_Mask_LinkTargetURL), "sal.osl",
881  "no FileStatus LinkTargetURL determined");
882  return isValid(osl_FileStatus_Mask_LinkTargetURL)
884  }
885 
886  friend class DirectoryItem;
887 };
888 
889 
896 class File: public FileBase
897 {
898  oslFileHandle _pData;
899  ::rtl::OUString _aPath;
900 
905 
909  File& operator = ( File& ) SAL_DELETED_FUNCTION;
910 
911 public:
912 
919  File( const ::rtl::OUString& ustrFileURL ): _pData( NULL ), _aPath( ustrFileURL ) {}
920 
925  {
926  close();
927  }
928 
936  rtl::OUString getURL() const { return _aPath; }
937 
980  RC open( sal_uInt32 uFlags )
981  {
982  return static_cast< RC >( osl_openFile( _aPath.pData, &_pData, uFlags ) );
983  }
984 
999  {
1000  oslFileError Error = osl_File_E_BADF;
1001 
1002  if( _pData )
1003  {
1004  Error=osl_closeFile( _pData );
1005  _pData = NULL;
1006  }
1007 
1008  return static_cast< RC >( Error );
1009  }
1010 
1027  RC setPos( sal_uInt32 uHow, sal_Int64 uPos ) SAL_WARN_UNUSED_RESULT
1028  {
1029  return static_cast< RC >( osl_setFilePos( _pData, uHow, uPos ) );
1030  }
1031 
1047  RC getPos( sal_uInt64& uPos )
1048  {
1049  return static_cast< RC >( osl_getFilePos( _pData, &uPos ) );
1050  }
1051 
1074  {
1075  return static_cast< RC >( osl_isEndOfFile( _pData, pIsEOF ) );
1076  }
1077 
1095  RC setSize( sal_uInt64 uSize )
1096  {
1097  return static_cast< RC >( osl_setFileSize( _pData, uSize ) );
1098  }
1099 
1119  RC getSize( sal_uInt64 &rSize )
1120  {
1121  return static_cast< RC >( osl_getFileSize( _pData, &rSize ) );
1122  }
1123 
1155  RC read( void *pBuffer, sal_uInt64 uBytesRequested, sal_uInt64& rBytesRead )
1156  {
1157  return static_cast< RC >( osl_readFile( _pData, pBuffer, uBytesRequested, &rBytesRead ) );
1158  }
1159 
1193  RC write(const void *pBuffer, sal_uInt64 uBytesToWrite, sal_uInt64& rBytesWritten)
1194  {
1195  return static_cast< RC >( osl_writeFile( _pData, pBuffer, uBytesToWrite, &rBytesWritten ) );
1196  }
1197 
1198 
1223  {
1224  return static_cast< RC >( osl_readLine( _pData, reinterpret_cast<sal_Sequence**>(&aSeq) ) );
1225  }
1226 
1246  RC sync() const
1247  {
1248  OSL_PRECOND(_pData, "File::sync(): File not open");
1249  return static_cast< RC >(osl_syncFile(_pData));
1250  }
1251 
1277  static RC copy( const ::rtl::OUString& ustrSourceFileURL, const ::rtl::OUString& ustrDestFileURL )
1278  {
1279  return static_cast< RC >( osl_copyFile( ustrSourceFileURL.pData, ustrDestFileURL.pData ) );
1280  }
1281 
1305  static RC move( const ::rtl::OUString& ustrSourceFileURL, const ::rtl::OUString& ustrDestFileURL )
1306  {
1307  return static_cast< RC >( osl_moveFile( ustrSourceFileURL.pData, ustrDestFileURL.pData ) );
1308  }
1309 
1337  static RC remove( const ::rtl::OUString& ustrFileURL )
1338  {
1339  return static_cast< RC >( osl_removeFile( ustrFileURL.pData ) );
1340  }
1341 
1357  static RC setAttributes( const ::rtl::OUString& ustrFileURL, sal_uInt64 uAttributes )
1358  {
1359  return static_cast< RC >( osl_setFileAttributes( ustrFileURL.pData, uAttributes ) );
1360  }
1361 
1383  static RC setTime(
1384  const ::rtl::OUString& ustrFileURL,
1385  const TimeValue& rCreationTime,
1386  const TimeValue& rLastAccessTime,
1387  const TimeValue& rLastWriteTime )
1388  {
1389  return static_cast< RC >( osl_setFileTime(
1390  ustrFileURL.pData,
1391  &rCreationTime,
1392  &rLastAccessTime,
1393  &rLastWriteTime ) );
1394  }
1395 
1396  friend class DirectoryItem;
1397 };
1398 
1399 
1406 {
1407  oslDirectoryItem _pData;
1408 
1409 public:
1410 
1414  DirectoryItem(): _pData( NULL )
1415  {
1416  }
1417 
1421  DirectoryItem( const DirectoryItem& rItem ): _pData( rItem._pData)
1422  {
1423  if( _pData )
1424  osl_acquireDirectoryItem( _pData );
1425  }
1426 
1431  {
1432  if( _pData )
1433  osl_releaseDirectoryItem( _pData );
1434  }
1435 
1440  {
1441  if (&rItem != this)
1442  {
1443  if( _pData )
1444  osl_releaseDirectoryItem( _pData );
1445 
1446  _pData = rItem._pData;
1447 
1448  if( _pData )
1449  osl_acquireDirectoryItem( _pData );
1450  }
1451  return *this;
1452  }
1453 
1460  bool is()
1461  {
1462  return _pData != NULL;
1463  }
1464 
1498  static RC get( const ::rtl::OUString& ustrFileURL, DirectoryItem& rItem )
1499  {
1500  if( rItem._pData)
1501  {
1502  osl_releaseDirectoryItem( rItem._pData );
1503  rItem._pData = NULL;
1504  }
1505 
1506  return static_cast< RC >( osl_getDirectoryItem( ustrFileURL.pData, &rItem._pData ) );
1507  }
1508 
1541  {
1542  return static_cast< RC >( osl_getFileStatus( _pData, &rStatus._aStatus, rStatus._nMask ) );
1543  }
1544 
1560  bool isIdenticalTo( const DirectoryItem &pOther )
1561  {
1562  return osl_identicalDirectoryItem( _pData, pOther._pData );
1563  }
1564 
1565  friend class Directory;
1566 };
1567 
1568 
1580 {
1581 public:
1583 
1593  virtual void DirectoryCreated(const rtl::OUString& aDirectoryUrl) = 0;
1594 };
1595 
1596 
1597 // This just an internal helper function for
1598 // private use.
1599 extern "C" inline void SAL_CALL onDirectoryCreated(void* pData, rtl_uString* aDirectoryUrl)
1600 {
1601  (static_cast<DirectoryCreationObserver*>(pData))->DirectoryCreated(aDirectoryUrl);
1602 }
1603 
1610 class Directory: public FileBase
1611 {
1612  oslDirectory _pData;
1613  ::rtl::OUString _aPath;
1614 
1619 
1623  Directory& operator = ( Directory& ) SAL_DELETED_FUNCTION;
1624 
1625 public:
1626 
1634  Directory( const ::rtl::OUString& strPath ): _pData( NULL ), _aPath( strPath )
1635  {
1636  }
1637 
1642  {
1643  close();
1644  }
1645 
1653  rtl::OUString getURL() const { return _aPath; }
1654 
1673  {
1674  return static_cast< RC >( osl_openDirectory( _aPath.pData, &_pData ) );
1675  }
1676 
1687  bool isOpen() { return _pData != NULL; }
1688 
1701  {
1702  oslFileError Error = osl_File_E_BADF;
1703 
1704  if( _pData )
1705  {
1706  Error=osl_closeDirectory( _pData );
1707  _pData = NULL;
1708  }
1709 
1710  return static_cast< RC >( Error );
1711  }
1712 
1713 
1731  {
1732  close();
1733  return open();
1734  }
1735 
1758  RC getNextItem( DirectoryItem& rItem, sal_uInt32 nHint = 0 )
1759  {
1760  if( rItem._pData )
1761  {
1762  osl_releaseDirectoryItem( rItem._pData );
1763  rItem._pData = NULL;
1764  }
1765  return ( RC) osl_getNextDirectoryItem( _pData, &rItem._pData, nHint );
1766  }
1767 
1768 
1799  static RC getVolumeInfo( const ::rtl::OUString& ustrDirectoryURL, VolumeInfo& rInfo )
1800  {
1801  return static_cast< RC >( osl_getVolumeInformation( ustrDirectoryURL.pData, &rInfo._aInfo, rInfo._nMask ) );
1802  }
1803 
1834  static RC create(
1835  const ::rtl::OUString& ustrDirectoryURL,
1836  sal_uInt32 flags = osl_File_OpenFlag_Read | osl_File_OpenFlag_Write )
1837  {
1838  return static_cast< RC >(
1839  osl_createDirectoryWithFlags( ustrDirectoryURL.pData, flags ) );
1840  }
1841 
1869  static RC remove( const ::rtl::OUString& ustrDirectoryURL )
1870  {
1871  return static_cast< RC >( osl_removeDirectory( ustrDirectoryURL.pData ) );
1872  }
1873 
1910  static RC createPath(
1911  const ::rtl::OUString& aDirectoryUrl,
1912  DirectoryCreationObserver* aDirectoryCreationObserver = NULL)
1913  {
1914  return static_cast< RC >(osl_createDirectoryPath(
1915  aDirectoryUrl.pData,
1916  (aDirectoryCreationObserver) ? onDirectoryCreated : NULL,
1917  aDirectoryCreationObserver));
1918  }
1919 };
1920 
1921 } /* namespace osl */
1922 
1923 #endif // INCLUDED_OSL_FILE_HXX
1924 
1925 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Definition: file.hxx:72
Definition: file.hxx:102
SAL_DLLPUBLIC oslFileError osl_copyFile(rtl_uString *pustrSourceFileURL, rtl_uString *pustrDestFileURL)
Copy a file to a new destination.
sal_uInt64 getFileSize() const
Get the size of the file.
Definition: file.hxx:830
Definition: file.h:337
SAL_DLLPUBLIC oslFileError osl_createTempFile(rtl_uString *pustrDirectoryURL, oslFileHandle *pHandle, rtl_uString **ppustrTempFileURL)
Creates a temporary file in the directory provided by the caller or the directory returned by osl_get...
Definition: file.hxx:76
Definition: file.hxx:91
sal_uInt64 uAttributes
File attributes.
Definition: file.h:389
SAL_DLLPUBLIC oslFileError osl_closeFile(oslFileHandle Handle)
Close an open file.
Definition: file.h:101
void * oslFileHandle
Definition: file.h:625
Definition: file.h:93
#define osl_Volume_Attribute_FloppyDisk
Definition: file.h:535
Definition: file.hxx:65
bool isRegular() const
Is it a regular file?
Definition: file.hxx:747
sal_uInt64 getTotalSpace() const
Determine the total space of a volume device.
Definition: file.hxx:531
SAL_DLLPUBLIC oslFileError osl_releaseVolumeDeviceHandle(oslVolumeDeviceHandle Handle)
Release a volume device handle.
Definition: file.hxx:73
oslFileType eType
The type of the file (file, directory, volume).
Definition: file.h:387
Definition: file.hxx:64
RC write(const void *pBuffer, sal_uInt64 uBytesToWrite, sal_uInt64 &rBytesWritten)
Write a number of bytes to a file.
Definition: file.hxx:1193
Definition: file.h:115
static RC searchFileURL(const ::rtl::OUString &ustrFileName, const ::rtl::OUString &ustrSearchPath, ::rtl::OUString &ustrFileURL)
Searche a full qualified system path or a file URL.
Definition: file.hxx:238
#define osl_FileStatus_Mask_FileName
Definition: file.h:366
The VolumeDevice class.
Definition: file.hxx:322
Definition: file.h:102
SAL_DLLPUBLIC oslFileError osl_openDirectory(rtl_uString *pustrDirectoryURL, oslDirectory *pDirectory)
Open a directory for enumerating its contents.
VolumeDevice()
Constructor.
Definition: file.hxx:331
static RC setTime(const ::rtl::OUString &ustrFileURL, const TimeValue &rCreationTime, const TimeValue &rLastAccessTime, const TimeValue &rLastWriteTime)
Set the file time.
Definition: file.hxx:1383
Definition: file.hxx:89
#define osl_Volume_Attribute_Case_Sensitive
Definition: file.h:538
Definition: file.h:114
SAL_DLLPUBLIC oslFileError osl_setFileAttributes(rtl_uString *pustrFileURL, sal_uInt64 uAttributes)
Set file attributes.
#define osl_Volume_Attribute_FixedDisk
Definition: file.h:533
bool isDirectory() const
Is it a directory? This method returns True for both directories, and volumes.
Definition: file.hxx:732
bool getFixedDiskFlag() const
Check the fixed disk flag.
Definition: file.hxx:508
sal_uInt32 uMaxPathLength
Maximum length of a full qualified path in system notation.
Definition: file.h:576
static RC getSystemPathFromFileURL(const ::rtl::OUString &ustrFileURL, ::rtl::OUString &ustrSystemPath)
Convert a file URL into a system dependent path.
Definition: file.hxx:187
#define osl_FileStatus_Mask_Attributes
Definition: file.h:361
SAL_DLLPUBLIC oslFileError osl_getVolumeInformation(rtl_uString *pustrDirectoryURL, oslVolumeInfo *pInfo, sal_uInt32 uFieldMask)
Retrieve information about a volume.
Definition: file.hxx:100
Definition: file.hxx:98
SAL_DLLPUBLIC oslFileError osl_acquireVolumeDeviceHandle(oslVolumeDeviceHandle Handle)
Acquire a volume device handle.
Definition: file.h:97
bool isIdenticalTo(const DirectoryItem &pOther)
Determine if a directory item point the same underlying file.
Definition: file.hxx:1560
static RC getTempDirURL(::rtl::OUString &ustrTempDirURL)
Retrieves the file URL of the system&#39;s temporary directory path.
Definition: file.hxx:252
The FileStatus class.
Definition: file.hxx:643
RC close()
Close an open file.
Definition: file.hxx:998
Definition: file.h:338
SAL_DLLPUBLIC oslFileError osl_getSystemPathFromFileURL(rtl_uString *pustrFileURL, rtl_uString **ppustrSystemPath)
Convert a file URL into a system dependent path.
Definition: time.h:66
Definition: file.h:334
Definition: file.h:127
static RC move(const ::rtl::OUString &ustrSourceFileURL, const ::rtl::OUString &ustrDestFileURL)
Move a file or directory to a new destination or renames it.
Definition: file.hxx:1305
VolumeDevice getDeviceHandle() const
Get the volume device handle.
Definition: file.hxx:604
SAL_DLLPUBLIC oslFileError osl_writeFile(oslFileHandle Handle, const void *pBuffer, sal_uInt64 uBytesToWrite, sal_uInt64 *pBytesWritten)
Write a number of bytes to a file.
SAL_DLLPUBLIC oslFileError osl_removeFile(rtl_uString *pustrFileURL)
Remove a regular file.
struct _oslVolumeInfo oslVolumeInfo
::rtl::OUString getFileName() const
Get the file name.
Definition: file.hxx:844
sal_uInt64 uUsedSpace
Used space on the volume for the current process/user.
Definition: file.h:570
SAL_DLLPUBLIC oslFileError osl_getVolumeDeviceMountPath(oslVolumeDeviceHandle Handle, rtl_uString **ppustrDirectoryURL)
Get the full qualified URL where a device is mounted to.
bool isValid(sal_uInt32 nMask) const
Check if specified fields are valid.
Definition: file.hxx:704
void * oslVolumeDeviceHandle
Definition: file.h:455
SAL_DLLPUBLIC oslFileError osl_createDirectoryPath(rtl_uString *aDirectoryUrl, oslDirectoryCreationCallbackFunc aDirectoryCreationCallbackFunc, void *pData)
Create a directory path.
SAL_DLLPUBLIC oslFileError osl_setFileTime(rtl_uString *pustrFileURL, const TimeValue *aCreationTime, const TimeValue *aLastAccessTime, const TimeValue *aLastWriteTime)
Set the file time.
Definition: file.h:336
bool isCaseSensitiveFileSystem() const
Return whether the file system is case sensitive or case insensitive.
Definition: file.hxx:615
TimeValue aAccessTime
Last access time in nanoseconds since 1/1/1970.
Definition: file.h:395
Definition: file.hxx:97
Definition: file.h:103
Definition: file.hxx:61
TimeValue getCreationTime() const
Get the creation time of this file.
Definition: file.hxx:786
DirectoryItem(const DirectoryItem &rItem)
Copy constructor.
Definition: file.hxx:1421
sal_uInt32 getMaxNameLength() const
Determine the maximal length of a file name.
Definition: file.hxx:567
static RC setAttributes(const ::rtl::OUString &ustrFileURL, sal_uInt64 uAttributes)
Set file attributes.
Definition: file.hxx:1357
SAL_DLLPUBLIC oslFileError osl_getFilePos(oslFileHandle Handle, sal_uInt64 *pPos)
Retrieve the current position of the internal pointer of an open file.
#define SAL_DELETED_FUNCTION
short-circuit extra-verbose API namespaces
Definition: types.h:392
Definition: file.h:100
static RC createPath(const ::rtl::OUString &aDirectoryUrl, DirectoryCreationObserver *aDirectoryCreationObserver=NULL)
Create a directory path.
Definition: file.hxx:1910
FileStatus(sal_uInt32 nMask)
Constructor.
Definition: file.hxx:676
bool getRemoveableFlag() const
Check the removeable flag.
Definition: file.hxx:475
#define osl_Volume_Attribute_Case_Is_Preserved
Definition: file.h:537
~FileStatus()
Destructor.
Definition: file.hxx:685
sal_uInt64 uFileSize
Size in bytes of the file.
Definition: file.h:399
Definition: file.h:129
Type getFileType() const
Get the file type.
Definition: file.hxx:714
rtl::OUString getURL() const
Obtain the URL.
Definition: file.hxx:936
Definition: file.h:340
RC sync() const
Synchronize the memory representation of a file with that on the physical medium. ...
Definition: file.hxx:1246
void * oslDirectoryItem
Definition: file.h:140
static RC getFileURLFromSystemPath(const ::rtl::OUString &ustrSystemPath, ::rtl::OUString &ustrFileURL)
Convert a system dependent path into a file URL.
Definition: file.hxx:206
sal_uInt64 uFreeSpace
Free space on the volume for the current process/user.
Definition: file.h:572
Definition: file.hxx:88
#define osl_FileStatus_Mask_ModifyTime
Definition: file.h:364
Main goals and usage hints.
bool isOpen()
Query if directory is open.
Definition: file.hxx:1687
SAL_DLLPUBLIC oslFileError osl_acquireDirectoryItem(oslDirectoryItem Item)
Increase the refcount of a directory item handle.
rtl_uString * ustrLinkTargetURL
Full URL of the target file if the file itself is a link.
Definition: file.h:409
#define osl_FileStatus_Mask_FileSize
Definition: file.h:365
sal_uInt64 getUsedSpace() const
Determine the used space of a volume device.
Definition: file.hxx:555
RC isEndOfFile(sal_Bool *pIsEOF)
Test if the end of a file is reached.
Definition: file.hxx:1073
Definition: file.hxx:80
Definition: file.hxx:69
sal_uInt32 uStructSize
Must be initialized with the size in bytes of the structure before passing it to any function...
Definition: file.h:383
static RC getVolumeInfo(const ::rtl::OUString &ustrDirectoryURL, VolumeInfo &rInfo)
Retrieve information about a volume.
Definition: file.hxx:1799
Definition: file.h:132
Definition: file.h:130
#define osl_Volume_Attribute_RAMDisk
Definition: file.h:534
Definition: file.hxx:77
#define osl_Volume_Attribute_Removeable
Definition: file.h:530
~File()
Destructor.
Definition: file.hxx:924
Definition: file.hxx:96
Definition: file.hxx:56
Definition: file.h:110
#define osl_FileStatus_Mask_CreationTime
Definition: file.h:362
rtl_uString * ustrFileSystemName
Points to a string that receives the name of the file system type.
Definition: file.h:579
Definition: file.hxx:85
RC
Definition: file.hxx:55
VolumeDevice(const VolumeDevice &rDevice)
Copy constructor.
Definition: file.hxx:341
The directory item class object provides access to file status information.
Definition: file.hxx:1405
SAL_DLLPUBLIC oslFileError osl_setFileSize(oslFileHandle Handle, sal_uInt64 uSize)
Set the file size of an open file.
C++ class representing a SAL byte sequence.
Definition: byteseq.h:165
~DirectoryItem()
Destructor.
Definition: file.hxx:1430
#define osl_FileStatus_Mask_FileURL
Definition: file.h:367
bool isValid(sal_uInt32 nMask) const
Check if specified fields are valid.
Definition: file.hxx:453
sal_uInt32 getMaxPathLength() const
Determine the maximal length of a path name.
Definition: file.hxx:579
SAL_DLLPUBLIC oslFileError osl_getFileStatus(oslDirectoryItem Item, oslFileStatus *pStatus, sal_uInt32 uFieldMask)
Retrieve information about a single file or directory.
Definition: file.hxx:103
Definition: file.h:133
Definition: file.h:112
::rtl::OUString getLinkTargetURL() const
Get the link target URL.
Definition: file.hxx:877
Definition: file.h:125
Definition: file.h:131
sal_uInt32 uValidFields
Determines which members of the structure contain valid data.
Definition: file.h:564
SAL_DLLPUBLIC oslFileError osl_createDirectoryWithFlags(rtl_uString *url, sal_uInt32 flags)
Create a directory, passing flags.
Definition: file.hxx:83
#define osl_FileStatus_Mask_LinkTargetURL
Definition: file.h:368
unsigned char sal_Bool
Definition: types.h:39
Definition: file.h:126
SAL_DLLPUBLIC oslFileError osl_closeDirectory(oslDirectory Directory)
Release a directory handle.
TimeValue aCreationTime
First creation time in nanoseconds since 1/1/1970.
Definition: file.h:392
bool getCompactDiscFlag() const
Check the compact disc flag.
Definition: file.hxx:486
SAL_DLLPUBLIC oslFileError osl_getFileSize(oslFileHandle Handle, sal_uInt64 *pSize)
Get the file size of an open file.
SAL_DLLPUBLIC oslFileError osl_getFileURLFromSystemPath(rtl_uString *pustrSystemPath, rtl_uString **ppustrFileURL)
Convert a system dependent path into a file URL.
Definition: file.hxx:92
Definition: file.h:105
SAL_DLLPUBLIC oslFileError osl_getTempDirURL(rtl_uString **pustrTempDirURL)
Retrieves the file URL of the system&#39;s temporary directory path.
SAL_DLLPUBLIC oslFileError osl_readFile(oslFileHandle Handle, void *pBuffer, sal_uInt64 uBytesRequested, sal_uInt64 *pBytesRead)
Read a number of bytes from a file.
SAL_DLLPUBLIC sal_Bool osl_identicalDirectoryItem(oslDirectoryItem pItemA, oslDirectoryItem pItemB)
Determine if two directory items point the same underlying file.
RC readLine(::rtl::ByteSequence &aSeq)
Read a line from a file.
Definition: file.hxx:1222
Definition: file.hxx:62
Structure containing information about files and directories.
Definition: file.h:381
SAL_DLLPUBLIC oslFileError osl_readLine(oslFileHandle Handle, sal_Sequence **ppSequence)
Read a line from a file.
The directory class object provides a enumeration of DirectoryItems.
Definition: file.hxx:1610
RC getPos(sal_uInt64 &uPos)
Retrieve the current position of the internal pointer of an open file.
Definition: file.hxx:1047
Definition: file.h:118
RC getNextItem(DirectoryItem &rItem, sal_uInt32 nHint=0)
Retrieve the next item of a previously opened directory.
Definition: file.hxx:1758
static RC copy(const ::rtl::OUString &ustrSourceFileURL, const ::rtl::OUString &ustrDestFileURL)
Copy a file to a new destination.
Definition: file.hxx:1277
Definition: file.hxx:99
SAL_DLLPUBLIC oslFileError osl_getNextDirectoryItem(oslDirectory Directory, oslDirectoryItem *pItem, sal_uInt32 uHint)
Retrieve the next item of a previously opened directory.
The file class object provides access to file contents and attributes.
Definition: file.hxx:896
rtl::OUString getURL() const
Obtain the URL.
Definition: file.hxx:1653
Definition: file.h:89
Definition: file.h:119
Definition: file.h:116
RC open(sal_uInt32 uFlags)
Open a regular file.
Definition: file.hxx:980
Definition: file.hxx:94
#define osl_File_OpenFlag_Read
Definition: file.h:629
Definition: conditn.hxx:37
Definition: file.hxx:101
Definition: file.h:128
Definition: file.h:113
Definition: file.h:122
Definition: file.hxx:59
Definition: file.h:94
Directory(const ::rtl::OUString &strPath)
Constructor.
Definition: file.hxx:1634
SAL_DLLPUBLIC oslFileError osl_getAbsoluteFileURL(rtl_uString *pustrBaseDirectoryURL, rtl_uString *pustrRelativeFileURL, rtl_uString **ppustrAbsoluteFileURL)
Convert a path relative to a given directory into an full qualified file URL.
oslVolumeDeviceHandle * pDeviceHandle
Pointer to handle the receives underlying device.
Definition: file.h:581
DirectoryItem & operator=(const DirectoryItem &rItem)
Assignment operator.
Definition: file.hxx:1439
~Directory()
Destructor.
Definition: file.hxx:1641
sal_uInt32 uAttributes
Attributes of the volume (remote and/or removable)
Definition: file.h:566
Definition: file.hxx:82
File(const ::rtl::OUString &ustrFileURL)
Constructor.
Definition: file.hxx:919
::rtl::OUString getFileURL() const
Get the URL of the file.
Definition: file.hxx:861
RC read(void *pBuffer, sal_uInt64 uBytesRequested, sal_uInt64 &rBytesRead)
Read a number of bytes from a file.
Definition: file.hxx:1155
bool getRAMDiskFlag() const
Check the RAM disk flag.
Definition: file.hxx:519
Definition: file.hxx:87
rtl_uString * ustrFileName
Case correct name of the file.
Definition: file.h:402
Definition: file.hxx:95
RC reset()
Resets the directory item enumeration to the beginning.
Definition: file.hxx:1730
Definition: file.h:104
static RC getCanonicalName(const ::rtl::OUString &ustrRequestedURL, ::rtl::OUString &ustrValidURL)
Determine a valid unused canonical name for a requested name.
Definition: file.hxx:129
Definition: file.h:117
Definition: file.hxx:84
Definition: file.h:111
Base class for observers of directory creation notifications.
Definition: file.hxx:1579
#define osl_File_OpenFlag_Write
Definition: file.h:630
sal_uInt64 getFreeSpace() const
Determine the free space of a volume device.
Definition: file.hxx:543
bool is()
Check for validity of this instance.
Definition: file.hxx:1460
~VolumeDevice()
Destructor.
Definition: file.hxx:351
Definition: file.hxx:57
TimeValue aModifyTime
Last modify time in nanoseconds since 1/1/1970.
Definition: file.h:397
Definition: file.h:108
static RC getAbsoluteFileURL(const ::rtl::OUString &ustrBaseDirectoryURL, const ::rtl::OUString &ustrRelativeFileURL, ::rtl::OUString &ustrAbsoluteFileURL)
Convert a path relative to a given directory into an full qualified file URL.
Definition: file.hxx:168
Definition: file.hxx:86
RC open()
Open a directory for enumerating its contents.
Definition: file.hxx:1672
This String class provides base functionality for C++ like Unicode character array handling...
Definition: ustring.hxx:120
#define osl_Volume_Attribute_Remote
Definition: file.h:531
bool isLink() const
Is it a link?
Definition: file.hxx:760
bool isCasePreservingFileSystem() const
Return whether the file system preserves the case of file and directory names or not.
Definition: file.hxx:627
Definition: file.h:106
oslFileError
Definition: file.h:87
Definition: file.h:121
SAL_DLLPUBLIC oslFileError osl_getCanonicalName(rtl_uString *pustrRequestedURL, rtl_uString **ppustrValidURL)
Determine a valid unused canonical name for a requested name.
Definition: file.hxx:68
Definition: file.hxx:90
SAL_DLLPUBLIC oslFileError osl_syncFile(oslFileHandle Handle)
Synchronize the memory representation of a file with that on the physical medium. ...
RC getSize(sal_uInt64 &rSize)
Get the file size of an open file.
Definition: file.hxx:1119
Definition: file.h:135
Definition: file.h:120
SAL_DLLPUBLIC oslFileError osl_searchFileURL(rtl_uString *pustrFileName, rtl_uString *pustrSearchPath, rtl_uString **ppustrFileURL)
Searche a full qualified system path or a file URL.
~VolumeInfo()
Destructor.
Definition: file.hxx:439
Definition: file.hxx:79
Definition: file.h:335
Definition: file.h:134
#define SAL_WARN_UNUSED_RESULT
Use this as markup for functions and methods whose return value must be checked.
Definition: types.h:307
#define SAL_INFO_IF(condition, area, stream)
Produce log entry from stream in the given log area if condition is true.
Definition: log.hxx:307
Definition: file.hxx:75
Definition: file.hxx:66
Definition: file.h:123
sal_uInt32 uMaxNameLength
Maximum length of file name of a single item.
Definition: file.h:574
Definition: file.h:96
#define osl_Volume_Attribute_CompactDisc
Definition: file.h:532
TimeValue getAccessTime() const
Get the file access time.
Definition: file.hxx:801
Definition: file.h:91
virtual ~DirectoryCreationObserver()
Definition: file.hxx:1582
Definition: file.hxx:74
SAL_DLLPUBLIC oslFileError osl_removeDirectory(rtl_uString *pustrDirectoryURL)
Remove an empty directory.
SAL_DLLPUBLIC oslFileError osl_setFilePos(oslFileHandle Handle, sal_uInt32 uHow, sal_Int64 uPos) SAL_WARN_UNUSED_RESULT
Set the internal position pointer of an open file.
SAL_DLLPUBLIC oslFileError osl_moveFile(rtl_uString *pustrSourceFileURL, rtl_uString *pustrDestFileURL)
Move a file or directory to a new destination or renames it.
Base class for all File System specific objects.
Definition: file.hxx:51
Definition: file.hxx:93
Definition: file.h:98
#define osl_FileStatus_Mask_Type
Definition: file.h:360
static RC create(const ::rtl::OUString &ustrDirectoryURL, sal_uInt32 flags=osl_File_OpenFlag_Read|osl_File_OpenFlag_Write)
Create a directory.
Definition: file.hxx:1834
sal_uInt64 getAttributes() const
Get the file attributes.
Definition: file.hxx:771
Definition: file.h:92
Definition: file.h:339
Definition: file.hxx:78
rtl_uString * ustrFileURL
Full URL of the file.
Definition: file.h:405
rtl::OUString getMountPath()
Get the full qualified URL where a device is mounted to.
Definition: file.hxx:383
#define OSL_PRECOND(c, m)
Definition: diagnose.h:105
#define osl_FileStatus_Mask_AccessTime
Definition: file.h:363
void * oslDirectory
Definition: file.h:139
Definition: file.h:341
sal_uInt32 uValidFields
Determines which members of the structure contain valid data.
Definition: file.h:385
Definition: file.hxx:60
DirectoryItem()
Constructor.
Definition: file.hxx:1414
SAL_DLLPUBLIC oslFileError osl_releaseDirectoryItem(oslDirectoryItem Item)
Decrease the refcount of a directory item handle.
SAL_DLLPUBLIC oslFileError osl_getDirectoryItem(rtl_uString *pustrFileURL, oslDirectoryItem *pItem)
Retrieve a single directory item.
Definition: file.h:107
RC setPos(sal_uInt32 uHow, sal_Int64 uPos) SAL_WARN_UNUSED_RESULT
Set the internal position pointer of an open file.
Definition: file.hxx:1027
Definition: file.h:90
Type
Definition: file.hxx:660
SAL_DLLPUBLIC void rtl_uString_release(rtl_uString *str) SAL_THROW_EXTERN_C() SAL_HOT
Decrement the reference count of a string.
RC getFileStatus(FileStatus &rStatus)
Retrieve information about a single file or directory.
Definition: file.hxx:1540
Definition: file.hxx:58
TimeValue getModifyTime() const
Get the file modification time.
Definition: file.hxx:816
Definition: file.h:99
The VolumeInfo class.
Definition: file.hxx:404
bool getRemoteFlag() const
Check the remote flag.
Definition: file.hxx:464
Definition: file.hxx:67
VolumeInfo(sal_uInt32 nMask)
Constructor.
Definition: file.hxx:428
Definition: file.h:124
Definition: file.hxx:63
Definition: file.h:109
Definition: file.hxx:81
RC close()
Close a directory.
Definition: file.hxx:1700
Structure containing information about volumes.
Definition: file.h:560
Definition: file.hxx:70
SAL_DLLPUBLIC oslFileError osl_openFile(rtl_uString *pustrFileURL, oslFileHandle *pHandle, sal_uInt32 uFlags)
Open a regular file.
RC setSize(sal_uInt64 uSize)
Set the file size of an open file.
Definition: file.hxx:1095
sal_uInt64 uTotalSpace
Total available space on the volume for the current process/user.
Definition: file.h:568
Definition: file.h:95
Definition: file.hxx:71
Definition: socket_decl.hxx:172
static RC createTempFile(::rtl::OUString *pustrDirectoryURL, oslFileHandle *pHandle, ::rtl::OUString *pustrTempFileURL)
Creates a temporary file in the directory provided by the caller or the directory returned by getTemp...
Definition: file.hxx:304
sal_uInt32 uStructSize
Must be initialized with the size in bytes of the structure before passing it to any function...
Definition: file.h:562
bool getFloppyDiskFlag() const
Check the floppy disc flag.
Definition: file.hxx:497
void onDirectoryCreated(void *pData, rtl_uString *aDirectoryUrl)
Definition: file.hxx:1599
Definition: file.h:88
::rtl::OUString getFileSystemName() const
Determine the name of the volume device&#39;s File System.
Definition: file.hxx:591
SAL_DLLPUBLIC oslFileError osl_isEndOfFile(oslFileHandle Handle, sal_Bool *pIsEOF)
Test if the end of a file is reached.