LibreOffice
LibreOffice 6.3 SDK C/C++ API Reference
|
Go to the documentation of this file.
20 #ifndef INCLUDED_OSL_FILE_HXX
21 #define INCLUDED_OSL_FILE_HXX
36 namespace rtl {
class ByteSequence; }
168 return static_cast< RC >(
osl_getAbsoluteFileURL( ustrBaseDirectoryURL.pData, ustrRelativeFileURL.pData, &ustrAbsoluteFileURL.pData ) );
238 return static_cast< RC >(
osl_searchFileURL( ustrFileName.pData, ustrSearchPath.pData, &ustrFileURL.pData ) );
307 rtl_uString* pustr_dir_url = pustrDirectoryURL ? pustrDirectoryURL->pData : NULL;
308 rtl_uString** ppustr_tmp_file_url = pustrTempFileURL ? &pustrTempFileURL->pData : NULL;
341 _aHandle = rDevice._aHandle;
371 _aHandle = newHandle;
670 memset(&_aStatus, 0,
sizeof(_aStatus));
709 "no FileStatus Type determined");
766 "no FileStatus Attributes determined");
781 "no FileStatus CreationTime determined");
796 "no FileStatus AccessTime determined");
811 "no FileStatus ModifyTime determined");
825 "no FileStatus FileSize determined");
839 "no FileStatus FileName determined");
856 "no FileStatus FileURL determined");
872 "no FileStatus LinkTargetURL determined");
910 File( const ::rtl::OUString& ustrFileURL ): _pData( NULL ), _aPath( ustrFileURL ) {}
973 return static_cast< RC >(
osl_openFile( _aPath.pData, &_pData, uFlags ) );
999 return static_cast< RC >( Error );
1146 RC read(
void *pBuffer, sal_uInt64 uBytesRequested, sal_uInt64& rBytesRead )
1148 return static_cast< RC >(
osl_readFile( _pData, pBuffer, uBytesRequested, &rBytesRead ) );
1184 RC write(
const void *pBuffer, sal_uInt64 uBytesToWrite, sal_uInt64& rBytesWritten)
1186 return static_cast< RC >(
osl_writeFile( _pData, pBuffer, uBytesToWrite, &rBytesWritten ) );
1239 OSL_PRECOND(_pData,
"File::sync(): File not open");
1268 static RC copy( const ::rtl::OUString& ustrSourceFileURL, const ::rtl::OUString& ustrDestFileURL )
1270 return static_cast< RC >(
osl_copyFile( ustrSourceFileURL.pData, ustrDestFileURL.pData ) );
1296 static RC move( const ::rtl::OUString& ustrSourceFileURL, const ::rtl::OUString& ustrDestFileURL )
1298 return static_cast< RC >(
osl_moveFile( ustrSourceFileURL.pData, ustrDestFileURL.pData ) );
1329 const ::rtl::OUString& ustrDestFileURL)
1331 return static_cast<RC>(
osl_replaceFile(ustrSourceFileURL.pData, ustrDestFileURL.pData));
1408 const ::rtl::OUString& ustrFileURL,
1417 &rLastWriteTime ) );
1470 _pData = rItem._pData;
1486 return _pData != NULL;
1527 rItem._pData = NULL;
1566 return static_cast< RC >(
osl_getFileStatus( _pData, &rStatus._aStatus, rStatus._nMask ) );
1658 Directory( const ::rtl::OUString& strPath ): _pData( NULL ), _aPath( strPath )
1734 return static_cast< RC >( Error );
1787 rItem._pData = NULL;
1859 const ::rtl::OUString& ustrDirectoryURL,
1862 return static_cast< RC >(
1893 static RC remove( const ::rtl::OUString& ustrDirectoryURL )
1935 const ::rtl::OUString& aDirectoryUrl,
1939 aDirectoryUrl.pData,
1941 aDirectoryCreationObserver));
1947 #endif // INCLUDED_OSL_FILE_HXX
::rtl::OUString getFileName() const
Get the file name.
Definition: file.hxx:835
RC
Definition: file.hxx:53
@ osl_File_E_invalidError
Definition: file.h:131
SAL_DLLPUBLIC oslFileError osl_closeDirectory(oslDirectory Directory)
Release a directory handle.
@ Unknown
Definition: file.hxx:659
Directory(const ::rtl::OUString &strPath)
Constructor.
Definition: file.hxx:1658
bool is()
Check for validity of this instance.
Definition: file.hxx:1484
SAL_WARN_UNUSED_RESULT RC setPos(sal_uInt32 uHow, sal_Int64 uPos)
Set the internal position pointer of an open file.
Definition: file.hxx:1018
SAL_DLLPUBLIC oslFileError osl_acquireVolumeDeviceHandle(oslVolumeDeviceHandle Handle)
Acquire a volume device handle.
@ osl_File_E_DOM
Definition: file.h:117
sal_uInt32 uStructSize
Must be initialized with the size in bytes of the structure before passing it to any function.
Definition: file.h:563
@ E_CHILD
there are no child processes
Definition: file.hxx:64
@ osl_File_E_ROFS
Definition: file.h:114
RC readLine(::rtl::ByteSequence &aSeq)
Read a line from a file.
Definition: file.hxx:1213
@ E_ILSEQ
invalid or incomplete byte sequence of multibyte char found
Definition: file.hxx:93
SAL_DLLPUBLIC oslFileError osl_getSystemPathFromFileURL(rtl_uString *pustrFileURL, rtl_uString **ppustrSystemPath)
Convert a file URL into a system dependent path.
The VolumeDevice class.
Definition: file.hxx:321
RC getPos(sal_uInt64 &uPos)
Retrieve the current position of the internal pointer of an open file.
Definition: file.hxx:1038
@ osl_File_E_NAMETOOLONG
Definition: file.h:120
static RC remove(const ::rtl::OUString &ustrFileURL)
Remove a regular file.
Definition: file.hxx:1361
SAL_DLLPUBLIC oslFileError osl_searchFileURL(rtl_uString *pustrFileName, rtl_uString *pustrSearchPath, rtl_uString **ppustrFileURL)
Search a full qualified system path or a file URL.
@ E_PERM
operation not permitted
Definition: file.hxx:55
@ E_NOLINK
link has been severed
Definition: file.hxx:94
@ osl_File_E_ISDIR
Definition: file.h:106
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_isEndOfFile(oslFileHandle Handle, sal_Bool *pIsEOF)
Test if the end of a file is reached.
SAL_DLLPUBLIC oslFileError osl_getNextDirectoryItem(oslDirectory Directory, oslDirectoryItem *pItem, sal_uInt32 uHint)
Retrieve the next item of a previously opened directory.
@ Regular
Definition: file.hxx:654
RC open(sal_uInt32 uFlags)
Open a regular file.
Definition: file.hxx:971
#define SAL_INFO_IF(condition, area, stream)
Produce log entry from stream in the given log area if condition is true.
Definition: log.hxx:313
~FileStatus()
Destructor.
Definition: file.hxx:676
@ Link
Definition: file.hxx:657
@ osl_File_E_RANGE
Definition: file.h:118
@ E_NAMETOOLONG
filename too long
Definition: file.hxx:88
#define osl_Volume_Attribute_FixedDisk
Definition: file.h:527
@ E_NOTTY
inappropriate I/O control operation
Definition: file.hxx:78
rtl_uString * ustrFileSystemName
Points to a string that receives the name of the file system type.
Definition: file.h:581
@ osl_File_E_PIPE
Definition: file.h:116
@ osl_File_E_NETWORK
Definition: file.h:133
@ E_ACCES
file permissions do not allow operation
Definition: file.hxx:67
@ osl_File_E_NOTTY
Definition: file.h:110
oslVolumeDeviceHandle * pDeviceHandle
Pointer to handle the receives underlying device.
Definition: file.h:584
sal_uInt64 getUsedSpace() const
Determine the used space of a volume device.
Definition: file.hxx:546
static RC getSystemPathFromFileURL(const ::rtl::OUString &ustrFileURL, ::rtl::OUString &ustrSystemPath)
Convert a file URL into a system dependent path.
Definition: file.hxx:185
sal_uInt32 uAttributes
Attributes of the volume (remote and/or removable)
Definition: file.h:567
SAL_DLLPUBLIC oslFileError osl_removeFile(rtl_uString *pustrFileURL)
Remove a regular file.
@ osl_File_E_MLINK
Definition: file.h:115
static RC create(const ::rtl::OUString &ustrDirectoryURL, sal_uInt32 flags=osl_File_OpenFlag_Read|osl_File_OpenFlag_Write)
Create a directory.
Definition: file.hxx:1858
@ osl_File_E_NOLINK
Definition: file.h:126
@ E_NOTDIR
file isn't a directory where one is needed
Definition: file.hxx:73
@ osl_File_E_MFILE
Definition: file.h:109
SAL_DLLPUBLIC oslFileError osl_getFileStatus(oslDirectoryItem Item, oslFileStatus *pStatus, sal_uInt32 uFieldMask)
Retrieve information about a single file or directory.
#define osl_Volume_Attribute_FloppyDisk
Definition: file.h:529
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...
rtl::OUString getURL() const
Obtain the URL.
Definition: file.hxx:1677
@ osl_File_E_LOOP
Definition: file.h:124
RC getNextItem(DirectoryItem &rItem, sal_uInt32 nHint=0)
Retrieve the next item of a previously opened directory.
Definition: file.hxx:1782
@ E_None
on success
Definition: file.hxx:54
@ E_NODEV
wrong device type specified
Definition: file.hxx:72
void * oslFileHandle
Definition: file.h:626
@ E_NOSYS
function not implemented
Definition: file.hxx:90
bool getRemoteFlag() const
Check the remote flag.
Definition: file.hxx:456
TimeValue getAccessTime() const
Get the file access time.
Definition: file.hxx:792
SAL_DLLPUBLIC oslFileError osl_getFileURLFromSystemPath(rtl_uString *pustrSystemPath, rtl_uString **ppustrFileURL)
Convert a system dependent path into a file URL.
@ osl_File_E_CHILD
Definition: file.h:96
@ E_NOTEMPTY
directory not empty
Definition: file.hxx:91
#define osl_FileStatus_Mask_FileSize
Definition: file.h:365
SAL_DLLPUBLIC oslFileError osl_releaseDirectoryItem(oslDirectoryItem Item)
Decrease the refcount of a directory item handle.
static RC getFileURLFromSystemPath(const ::rtl::OUString &ustrSystemPath, ::rtl::OUString &ustrFileURL)
Convert a system dependent path into a file URL.
Definition: file.hxx:204
SAL_DLLPUBLIC oslFileError osl_openDirectory(rtl_uString *pustrDirectoryURL, oslDirectory *pDirectory)
Open a directory for enumerating its contents.
@ E_NETWORK
Definition: file.hxx:101
SAL_DLLPUBLIC oslFileError osl_getFileSize(oslFileHandle Handle, sal_uInt64 *pSize)
Get the file size of an open file.
#define osl_FileStatus_Mask_CreationTime
Definition: file.h:362
@ osl_File_E_PERM
Definition: file.h:87
@ Volume
Definition: file.hxx:653
@ osl_File_E_NOEXEC
Definition: file.h:94
@ osl_File_E_EXIST
Definition: file.h:102
#define osl_FileStatus_Mask_FileName
Definition: file.h:366
@ E_BUSY
resource busy
Definition: file.hxx:69
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:1296
The directory item class object provides access to file status information.
Definition: file.hxx:1430
C++ class representing a SAL byte sequence.
Definition: byteseq.h:166
@ osl_File_E_FBIG
Definition: file.h:111
sal_uInt32 uValidFields
Determines which members of the structure contain valid data.
Definition: file.h:565
@ E_TIMEDOUT
socket operation timed out
Definition: file.hxx:100
bool isRegular() const
Is it a regular file?
Definition: file.hxx:738
SAL_DLLPUBLIC oslFileError osl_syncFile(oslFileHandle Handle)
Synchronize the memory representation of a file with that on the physical medium.
@ osl_File_E_NODEV
Definition: file.h:104
sal_uInt64 uUsedSpace
Used space on the volume for the current process/user.
Definition: file.h:571
@ osl_File_E_DEADLK
Definition: file.h:119
sal_uInt64 uFileSize
Size in bytes of the file.
Definition: file.h:396
@ E_NOLCK
no locks available
Definition: file.hxx:89
@ E_NXIO
no such device or address
Definition: file.hxx:60
Definition: condition.hxx:28
static RC replace(const ::rtl::OUString &ustrSourceFileURL, const ::rtl::OUString &ustrDestFileURL)
Move a file to a new destination or rename it, taking old file's identity (if exists).
Definition: file.hxx:1328
@ E_BADF
bad file descriptor
Definition: file.hxx:63
@ E_AGAIN
resource temp unavailable, try again later
Definition: file.hxx:65
@ E_XDEV
improper link across file systems detected
Definition: file.hxx:71
@ osl_File_E_AGAIN
Definition: file.h:97
@ E_OVERFLOW
value too large for defined data type
Definition: file.hxx:97
#define osl_FileStatus_Mask_FileURL
Definition: file.h:367
@ osl_File_E_TIMEDOUT
Definition: file.h:132
@ osl_File_E_NOLCK
Definition: file.h:121
@ E_FBIG
file too large
Definition: file.hxx:79
The FileStatus class.
Definition: file.hxx:635
@ E_DOM
domain error (mathematical error)
Definition: file.hxx:85
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:166
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.
bool isLink() const
Is it a link?
Definition: file.hxx:751
void onDirectoryCreated(void *pData, rtl_uString *aDirectoryUrl)
Definition: file.hxx:1623
~Directory()
Destructor.
Definition: file.hxx:1665
static RC copy(const ::rtl::OUString &ustrSourceFileURL, const ::rtl::OUString &ustrDestFileURL)
Copy a file to a new destination.
Definition: file.hxx:1268
SAL_DLLPUBLIC oslFileError osl_copyFile(rtl_uString *pustrSourceFileURL, rtl_uString *pustrDestFileURL)
Copy a file to a new destination.
@ osl_File_E_NOTDIR
Definition: file.h:105
RC read(void *pBuffer, sal_uInt64 uBytesRequested, sal_uInt64 &rBytesRead)
Read a number of bytes from a file.
Definition: file.hxx:1146
@ E_invalidError
unmapped error: always last entry in enum!
Definition: file.hxx:99
@ osl_File_E_SRCH
Definition: file.h:89
static RC get(const ::rtl::OUString &ustrFileURL, DirectoryItem &rItem)
Retrieve a single directory item.
Definition: file.hxx:1522
The directory class object provides a enumeration of DirectoryItems.
Definition: file.hxx:1635
@ osl_File_Type_Fifo
Definition: file.h:328
SAL_DLLPUBLIC oslFileError osl_createDirectoryPath(rtl_uString *aDirectoryUrl, oslDirectoryCreationCallbackFunc aDirectoryCreationCallbackFunc, void *pData)
Create a directory path.
SAL_DLLPUBLIC oslFileError osl_setFileSize(oslFileHandle Handle, sal_uInt64 uSize)
Set the file size of an open file.
@ E_PIPE
broken pipe; no process reading from other end of pipe
Definition: file.hxx:84
SAL_DLLPUBLIC oslFileError osl_releaseVolumeDeviceHandle(oslVolumeDeviceHandle Handle)
Release a volume device handle.
The file class object provides access to file contents and attributes.
Definition: file.hxx:888
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:236
@ osl_File_Type_Special
Definition: file.h:331
unsigned char sal_Bool
Definition: types.h:38
SAL_DLLPUBLIC oslFileError osl_getDirectoryItem(rtl_uString *pustrFileURL, oslDirectoryItem *pItem)
Retrieve a single directory item.
~VolumeInfo()
Definition: file.hxx:433
@ E_ISDIR
file is a directory, invalid operation
Definition: file.hxx:74
RC close()
Close an open file.
Definition: file.hxx:989
@ E_NOMEM
no memory available
Definition: file.hxx:66
@ osl_File_E_ACCES
Definition: file.h:99
@ osl_File_E_INVAL
Definition: file.h:107
@ osl_File_E_INTR
Definition: file.h:90
static RC setTime(const ::rtl::OUString &ustrFileURL, const TimeValue &rCreationTime, const TimeValue &rLastAccessTime, const TimeValue &rLastWriteTime)
Set the file time.
Definition: file.hxx:1407
@ E_NOEXEC
invalid executable file format
Definition: file.hxx:62
~DirectoryItem()
Destructor.
Definition: file.hxx:1454
sal_uInt32 uStructSize
Must be initialized with the size in bytes of the structure before passing it to any function.
Definition: file.h:380
@ osl_File_E_2BIG
Definition: file.h:93
@ E_ROFS
illegal modification to read-only filesystem
Definition: file.hxx:82
File(const ::rtl::OUString &ustrFileURL)
Constructor.
Definition: file.hxx:910
oslFileError
Definition: file.h:85
Definition: socket_decl.hxx:192
sal_uInt32 uMaxPathLength
Maximum length of a full qualified path in system notation.
Definition: file.h:577
bool isValid(sal_uInt32 nMask) const
Check if specified fields are valid.
Definition: file.hxx:695
sal_uInt64 getFreeSpace() const
Determine the free space of a volume device.
Definition: file.hxx:534
The VolumeInfo class.
Definition: file.hxx:403
::rtl::OUString getFileSystemName() const
Determine the name of the volume device's File System.
Definition: file.hxx:582
#define OSL_PRECOND(c, m)
Check the precondition of functions.
Definition: diagnose.h:109
sal_uInt64 uTotalSpace
Total available space on the volume for the current process/user.
Definition: file.h:569
bool getFloppyDiskFlag() const
Check the floppy disc flag.
Definition: file.hxx:488
DirectoryItem()
Constructor.
Definition: file.hxx:1438
@ osl_File_E_IO
Definition: file.h:91
#define osl_File_OpenFlag_Read
Definition: file.h:630
@ E_MFILE
process has too many distinct files open
Definition: file.hxx:77
SAL_DLLPUBLIC oslFileError osl_openFile(rtl_uString *pustrFileURL, oslFileHandle *pHandle, sal_uInt32 uFlags)
Open a regular file.
@ osl_File_E_NOSYS
Definition: file.h:122
sal_uInt32 uValidFields
Determines which members of the structure contain valid data.
Definition: file.h:382
@ E_NFILE
too many distinct file openings
Definition: file.hxx:76
@ osl_File_E_BADF
Definition: file.h:95
bool getRAMDiskFlag() const
Check the RAM disk flag.
Definition: file.hxx:510
TimeValue aModifyTime
Last modify time in nanoseconds since 1/1/1970.
Definition: file.h:394
@ osl_File_Type_Directory
Definition: file.h:325
@ E_MULTIHOP
remote resource is not directly available
Definition: file.hxx:95
sal_uInt64 getTotalSpace() const
Determine the total space of a volume device.
Definition: file.hxx:522
rtl_uString * ustrFileName
Case correct name of the file.
Definition: file.h:399
RC getSize(sal_uInt64 &rSize)
Get the file size of an open file.
Definition: file.hxx:1110
Type
Definition: file.hxx:651
#define osl_Volume_Attribute_Case_Is_Preserved
Definition: file.h:531
SAL_DLLPUBLIC oslFileError osl_moveFile(rtl_uString *pustrSourceFileURL, rtl_uString *pustrDestFileURL)
Move a file or directory to a new destination or renames it.
SAL_DLLPUBLIC oslFileError osl_getVolumeDeviceMountPath(oslVolumeDeviceHandle Handle, rtl_uString **ppustrDirectoryURL)
Get the full qualified URL where a device is mounted to.
@ Fifo
Definition: file.hxx:655
RC sync() const
Synchronize the memory representation of a file with that on the physical medium.
Definition: file.hxx:1237
FileStatus(sal_uInt32 nMask)
Constructor.
Definition: file.hxx:667
sal_uInt64 uFreeSpace
Free space on the volume for the current process/user.
Definition: file.h:573
rtl_uString * ustrLinkTargetURL
Full URL of the target file if the file itself is a link.
Definition: file.h:406
sal_uInt32 uMaxNameLength
Maximum length of file name of a single item.
Definition: file.h:575
SAL_DLLPUBLIC oslFileError osl_setFileTime(rtl_uString *pustrFileURL, const TimeValue *aCreationTime, const TimeValue *aLastAccessTime, const TimeValue *aLastWriteTime)
Set the file time.
SAL_DLLPUBLIC oslFileError osl_createDirectoryWithFlags(rtl_uString *url, sal_uInt32 flags)
Create a directory, passing flags.
@ Special
Definition: file.hxx:658
void * oslVolumeDeviceHandle
Definition: file.h:450
@ osl_File_Type_Link
Definition: file.h:330
@ osl_File_E_NOENT
Definition: file.h:88
VolumeDevice getDeviceHandle() const
Get the volume device handle.
Definition: file.hxx:595
#define osl_File_OpenFlag_Write
Definition: file.h:631
SAL_DLLPUBLIC oslFileError osl_replaceFile(rtl_uString *pustrSourceFileURL, rtl_uString *pustrDestFileURL)
Move a file to a new destination or rename it, taking old file's identity (if exists).
@ E_2BIG
argument list too long
Definition: file.hxx:61
#define osl_FileStatus_Mask_LinkTargetURL
Definition: file.h:368
SAL_DLLPUBLIC oslFileError osl_setFileAttributes(rtl_uString *pustrFileURL, sal_uInt64 uAttributes)
Set file attributes.
#define osl_FileStatus_Mask_AccessTime
Definition: file.h:363
RC getFileStatus(FileStatus &rStatus)
Retrieve information about a single file or directory.
Definition: file.hxx:1564
sal_uInt64 getFileSize() const
Get the size of the file.
Definition: file.hxx:821
::rtl::OUString getFileURL() const
Get the URL of the file.
Definition: file.hxx:852
sal_uInt64 getAttributes() const
Get the file attributes.
Definition: file.hxx:762
SAL_DLLPUBLIC oslFileError osl_readLine(oslFileHandle Handle, sal_Sequence **ppSequence)
Read a line from a file.
rtl::OUString getMountPath()
Get the full qualified URL where a device is mounted to.
Definition: file.hxx:381
#define osl_Volume_Attribute_CompactDisc
Definition: file.h:526
@ osl_File_E_SPIPE
Definition: file.h:113
Base class for all File System specific objects.
Definition: file.hxx:50
SAL_DLLPUBLIC oslFileError osl_getVolumeInformation(rtl_uString *pustrDirectoryURL, oslVolumeInfo *pInfo, sal_uInt32 uFieldMask)
Retrieve information about a volume.
#define osl_FileStatus_Mask_ModifyTime
Definition: file.h:364
@ osl_File_E_None
Definition: file.h:86
sal_uInt64 uAttributes
File attributes.
Definition: file.h:386
bool isOpen()
Query if directory is open.
Definition: file.hxx:1711
@ E_INTR
function call was interrupted
Definition: file.hxx:58
@ osl_File_E_NOMEM
Definition: file.h:98
oslFileType eType
The type of the file (file, directory, volume).
Definition: file.h:384
@ osl_File_Type_Volume
Definition: file.h:326
RC setSize(sal_uInt64 uSize)
Set the file size of an open file.
Definition: file.hxx:1086
#define osl_FileStatus_Mask_Type
Definition: file.h:360
@ E_EXIST
file exists where should only be created
Definition: file.hxx:70
RC reset()
Resets the directory item enumeration to the beginning.
Definition: file.hxx:1754
@ osl_File_E_NOSPC
Definition: file.h:112
@ osl_File_E_ILSEQ
Definition: file.h:125
RC close()
Close a directory.
Definition: file.hxx:1724
SAL_DLLPUBLIC oslFileError osl_getTempDirURL(rtl_uString **pustrTempDirURL)
Retrieves the file URL of the system's temporary directory path.
#define osl_Volume_Attribute_RAMDisk
Definition: file.h:528
@ osl_File_Type_Socket
Definition: file.h:329
VolumeInfo(sal_uInt32 nMask)
Constructor.
Definition: file.hxx:425
DirectoryItem(const DirectoryItem &rItem)
Copy constructor.
Definition: file.hxx:1445
struct _oslVolumeInfo oslVolumeInfo
Structure containing information about volumes.
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:302
SAL_DLLPUBLIC void rtl_uString_release(rtl_uString *str) SAL_THROW_EXTERN_C() SAL_HOT
Decrement the reference count of a string.
@ E_MLINK
too many links to file
Definition: file.hxx:83
@ E_NOENT
no such file or directory
Definition: file.hxx:56
RC isEndOfFile(sal_Bool *pIsEOF)
Test if the end of a file is reached.
Definition: file.hxx:1064
#define SAL_WARN_UNUSED_RESULT
Use this as markup for functions and methods whose return value must be checked.
Definition: types.h:302
static RC createPath(const ::rtl::OUString &aDirectoryUrl, DirectoryCreationObserver *aDirectoryCreationObserver=NULL)
Create a directory path.
Definition: file.hxx:1934
SAL_DLLPUBLIC oslFileError osl_removeDirectory(rtl_uString *pustrDirectoryURL)
Remove an empty directory.
SAL_WARN_UNUSED_RESULT SAL_DLLPUBLIC oslFileError osl_setFilePos(oslFileHandle Handle, sal_uInt32 uHow, sal_Int64 uPos)
Set the internal position pointer of an open file.
Structure containing information about files and directories.
Definition: file.h:378
@ E_FAULT
bad address; an invalid pointer detected
Definition: file.hxx:68
::rtl::OUString getLinkTargetURL() const
Get the link target URL.
Definition: file.hxx:868
sal_uInt32 getMaxNameLength() const
Determine the maximal length of a file name.
Definition: file.hxx:558
#define osl_FileStatus_Mask_Attributes
Definition: file.h:361
Definition: bootstrap.hxx:30
@ osl_File_E_BUSY
Definition: file.h:101
This String class provides base functionality for C++ like Unicode character array handling.
Definition: ustring.hxx:127
bool isDirectory() const
Is it a directory? This method returns True for both directories, and volumes.
Definition: file.hxx:723
@ osl_File_E_FAULT
Definition: file.h:100
~File()
Destructor.
Definition: file.hxx:915
@ E_DEADLK
deadlock avoided
Definition: file.hxx:87
@ osl_File_Type_Unknown
Definition: file.h:332
bool isValid(sal_uInt32 nMask) const
Check if specified fields are valid.
Definition: file.hxx:446
#define osl_Volume_Attribute_Removeable
Definition: file.h:524
bool isCasePreservingFileSystem() const
Return whether the file system preserves the case of file and directory names or not.
Definition: file.hxx:618
RC open()
Open a directory for enumerating its contents.
Definition: file.hxx:1696
SAL_DLLPUBLIC oslFileError osl_getFilePos(oslFileHandle Handle, sal_uInt64 *pPos)
Retrieve the current position of the internal pointer of an open file.
VolumeDevice(const VolumeDevice &rDevice)
Copy constructor.
Definition: file.hxx:339
void * oslDirectory
Definition: file.h:139
Structure containing information about volumes.
Definition: file.h:560
VolumeDevice & operator=(const VolumeDevice &rDevice)
Assignment operator.
Definition: file.hxx:361
@ E_SPIPE
invalid seek operation (such as on pipe)
Definition: file.hxx:81
static RC remove(const ::rtl::OUString &ustrDirectoryURL)
Remove an empty directory.
Definition: file.hxx:1893
@ E_INVAL
invalid argument to library function
Definition: file.hxx:75
static RC setAttributes(const ::rtl::OUString &ustrFileURL, sal_uInt64 uAttributes)
Set file attributes.
Definition: file.hxx:1381
~VolumeDevice()
Destructor.
Definition: file.hxx:349
@ osl_File_E_NFILE
Definition: file.h:108
bool isCaseSensitiveFileSystem() const
Return whether the file system is case sensitive or case insensitive.
Definition: file.hxx:606
VolumeDevice()
Constructor.
Definition: file.hxx:329
@ E_USERS
file quote system is confused as there are too many users
Definition: file.hxx:96
#define SAL_DELETED_FUNCTION
short-circuit extra-verbose API namespaces
Definition: types.h:396
@ osl_File_Type_Regular
Definition: file.h:327
bool getCompactDiscFlag() const
Check the compact disc flag.
Definition: file.hxx:477
rtl::OUString getURL() const
Obtain the URL.
Definition: file.hxx:927
bool getRemoveableFlag() const
Check the removable flag.
Definition: file.hxx:466
void * oslDirectoryItem
Definition: file.h:140
#define osl_Volume_Attribute_Case_Sensitive
Definition: file.h:532
SAL_DLLPUBLIC oslFileError osl_readFile(oslFileHandle Handle, void *pBuffer, sal_uInt64 uBytesRequested, sal_uInt64 *pBytesRead)
Read a number of bytes from a file.
bool getFixedDiskFlag() const
Check the fixed disk flag.
Definition: file.hxx:499
@ osl_File_E_NOTREADY
Definition: file.h:130
@ E_LOOP
too many levels of symbolic links found during name lookup
Definition: file.hxx:92
RC write(const void *pBuffer, sal_uInt64 uBytesToWrite, sal_uInt64 &rBytesWritten)
Write a number of bytes to a file.
Definition: file.hxx:1184
@ osl_File_E_NOTEMPTY
Definition: file.h:123
virtual void DirectoryCreated(const rtl::OUString &aDirectoryUrl)=0
This method will be called when a new directory has been created and needs to be overwritten by deriv...
@ osl_File_E_MULTIHOP
Definition: file.h:127
TimeValue aCreationTime
First creation time in nanoseconds since 1/1/1970.
Definition: file.h:389
SAL_DLLPUBLIC oslFileError osl_acquireDirectoryItem(oslDirectoryItem Item)
Increase the refcount of a directory item handle.
TimeValue aAccessTime
Last access time in nanoseconds since 1/1/1970.
Definition: file.h:392
SAL_DLLPUBLIC oslFileError osl_getCanonicalName(rtl_uString *pustrRequestedURL, rtl_uString **ppustrValidURL)
Determine a valid unused canonical name for a requested name.
static RC getVolumeInfo(const ::rtl::OUString &ustrDirectoryURL, VolumeInfo &rInfo)
Retrieve information about a volume.
Definition: file.hxx:1823
virtual ~DirectoryCreationObserver()
Definition: file.hxx:1606
SAL_DLLPUBLIC sal_Bool osl_identicalDirectoryItem(oslDirectoryItem pItemA, oslDirectoryItem pItemB)
Determine if two directory items point the same underlying file.
TimeValue getCreationTime() const
Get the creation time of this file.
Definition: file.hxx:777
sal_uInt32 getMaxPathLength() const
Determine the maximal length of a path name.
Definition: file.hxx:570
@ E_NOTREADY
device not ready
Definition: file.hxx:98
@ E_NOSPC
no space left on device, write failed
Definition: file.hxx:80
static RC getCanonicalName(const ::rtl::OUString &ustrRequestedURL, ::rtl::OUString &ustrValidURL)
Determine a valid unused canonical name for a requested name.
Definition: file.hxx:127
Type getFileType() const
Get the file type.
Definition: file.hxx:705
DirectoryItem & operator=(const DirectoryItem &rItem)
Assignment operator.
Definition: file.hxx:1463
@ osl_File_E_USERS
Definition: file.h:128
@ osl_File_E_OVERFLOW
Definition: file.h:129
Base class for observers of directory creation notifications.
Definition: file.hxx:1604
bool isIdenticalTo(const DirectoryItem &pOther)
Determine if a directory item point the same underlying file.
Definition: file.hxx:1584
@ E_RANGE
range error (mathematical error)
Definition: file.hxx:86
@ E_SRCH
no process matches the PID
Definition: file.hxx:57
static RC getTempDirURL(::rtl::OUString &ustrTempDirURL)
Retrieves the file URL of the system's temporary directory path.
Definition: file.hxx:250
This is the binary specification of a SAL sequence.
Definition: types.h:322
SAL_DLLPUBLIC oslFileError osl_closeFile(oslFileHandle Handle)
Close an open file.
TimeValue getModifyTime() const
Get the file modification time.
Definition: file.hxx:807
@ osl_File_E_NXIO
Definition: file.h:92
@ osl_File_E_XDEV
Definition: file.h:103
#define osl_Volume_Attribute_Remote
Definition: file.h:525
@ E_IO
I/O error occurred.
Definition: file.hxx:59
rtl_uString * ustrFileURL
Full URL of the file.
Definition: file.h:402