LibreOffice 6.0 SDK C/C++ API Reference
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
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 .
18  */
23 #include <sal/config.h>
25 #include <osl/time.h>
26 #include <rtl/ustring.h>
27 #include <sal/saldllapi.h>
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
84 /* Error codes according to errno */
85 typedef enum {
135 } oslFileError;
137 typedef void *oslDirectory;
138 typedef void *oslDirectoryItem;
163 SAL_DLLPUBLIC oslFileError SAL_CALL osl_openDirectory(
164  rtl_uString *pustrDirectoryURL, oslDirectory *pDirectory);
195 SAL_DLLPUBLIC oslFileError SAL_CALL osl_getNextDirectoryItem(
196  oslDirectory Directory,
197  oslDirectoryItem *pItem,
198  sal_uInt32 uHint
199  );
214 SAL_DLLPUBLIC oslFileError SAL_CALL osl_closeDirectory(
215  oslDirectory Directory);
251 SAL_DLLPUBLIC oslFileError SAL_CALL osl_getDirectoryItem(
252  rtl_uString *pustrFileURL,
253  oslDirectoryItem *pItem
254  );
271 SAL_DLLPUBLIC oslFileError SAL_CALL osl_acquireDirectoryItem(
272  oslDirectoryItem Item );
292 SAL_DLLPUBLIC oslFileError SAL_CALL osl_releaseDirectoryItem(
293  oslDirectoryItem Item );
314  oslDirectoryItem pItemA,
315  oslDirectoryItem pItemB );
322 typedef enum {
323  osl_File_Type_Directory, /*< directory */
324  osl_File_Type_Volume, /*< volume (e.g. C:, A:) */
325  osl_File_Type_Regular, /*< regular file */
326  osl_File_Type_Fifo, /*< named pipe */
327  osl_File_Type_Socket, /*< socket */
328  osl_File_Type_Link, /*< file link */
329  osl_File_Type_Special, /*< special device file */
330  osl_File_Type_Unknown /*< unknown file type */
331 } oslFileType;
339 #define osl_File_Attribute_ReadOnly 0x00000001
340 #define osl_File_Attribute_Hidden 0x00000002
341 #define osl_File_Attribute_Executable 0x00000010
342 #define osl_File_Attribute_GrpWrite 0x00000020
343 #define osl_File_Attribute_GrpRead 0x00000040
344 #define osl_File_Attribute_GrpExe 0x00000080
345 #define osl_File_Attribute_OwnWrite 0x00000100
346 #define osl_File_Attribute_OwnRead 0x00000200
347 #define osl_File_Attribute_OwnExe 0x00000400
348 #define osl_File_Attribute_OthWrite 0x00000800
349 #define osl_File_Attribute_OthRead 0x00001000
350 #define osl_File_Attribute_OthExe 0x00002000
358 #define osl_FileStatus_Mask_Type 0x00000001
359 #define osl_FileStatus_Mask_Attributes 0x00000002
360 #define osl_FileStatus_Mask_CreationTime 0x00000010
361 #define osl_FileStatus_Mask_AccessTime 0x00000020
362 #define osl_FileStatus_Mask_ModifyTime 0x00000040
363 #define osl_FileStatus_Mask_FileSize 0x00000080
364 #define osl_FileStatus_Mask_FileName 0x00000100
365 #define osl_FileStatus_Mask_FileURL 0x00000200
366 #define osl_FileStatus_Mask_LinkTargetURL 0x00000400
367 #define osl_FileStatus_Mask_All 0x7FFFFFFF
368 #define osl_FileStatus_Mask_Validate 0x80000000
376 typedef struct _oslFileStatus {
378  sal_uInt32 uStructSize;
380  sal_uInt32 uValidFields;
382  oslFileType eType;
384  sal_uInt64 uAttributes;
394  sal_uInt64 uFileSize;
397  rtl_uString *ustrFileName;
400  rtl_uString *ustrFileURL;
404  rtl_uString *ustrLinkTargetURL;
405 } oslFileStatus;
445 SAL_DLLPUBLIC oslFileError SAL_CALL osl_getFileStatus(
446  oslDirectoryItem Item, oslFileStatus *pStatus, sal_uInt32 uFieldMask );
448 typedef void *oslVolumeDeviceHandle;
467 SAL_DLLPUBLIC oslFileError SAL_CALL osl_releaseVolumeDeviceHandle(
468  oslVolumeDeviceHandle Handle );
487 SAL_DLLPUBLIC oslFileError SAL_CALL osl_acquireVolumeDeviceHandle(
488  oslVolumeDeviceHandle Handle );
514 SAL_DLLPUBLIC oslFileError SAL_CALL osl_getVolumeDeviceMountPath(
515  oslVolumeDeviceHandle Handle, rtl_uString **ppustrDirectoryURL);
522 #define osl_Volume_Attribute_Removeable 0x00000001L
523 #define osl_Volume_Attribute_Remote 0x00000002L
524 #define osl_Volume_Attribute_CompactDisc 0x00000004L
525 #define osl_Volume_Attribute_FixedDisk 0x00000008L
526 #define osl_Volume_Attribute_RAMDisk 0x00000010L
527 #define osl_Volume_Attribute_FloppyDisk 0x00000020L
529 #define osl_Volume_Attribute_Case_Is_Preserved 0x00000040L
530 #define osl_Volume_Attribute_Case_Sensitive 0x00000080L
540 #define osl_VolumeInfo_Mask_Attributes 0x00000001L
541 #define osl_VolumeInfo_Mask_TotalSpace 0x00000002L
542 #define osl_VolumeInfo_Mask_UsedSpace 0x00000004L
543 #define osl_VolumeInfo_Mask_FreeSpace 0x00000008L
544 #define osl_VolumeInfo_Mask_MaxNameLength 0x00000010L
545 #define osl_VolumeInfo_Mask_MaxPathLength 0x00000020L
546 #define osl_VolumeInfo_Mask_FileSystemName 0x00000040L
547 #define osl_VolumeInfo_Mask_DeviceHandle 0x00000080L
548 #define osl_VolumeInfo_Mask_FileSystemCaseHandling 0x00000100L
556 typedef struct _oslVolumeInfo {
559  sal_uInt32 uStructSize;
561  sal_uInt32 uValidFields;
563  sal_uInt32 uAttributes;
565  sal_uInt64 uTotalSpace;
567  sal_uInt64 uUsedSpace;
569  sal_uInt64 uFreeSpace;
571  sal_uInt32 uMaxNameLength;
573  sal_uInt32 uMaxPathLength;
577  rtl_uString *ustrFileSystemName;
580  oslVolumeDeviceHandle *pDeviceHandle;
581 } oslVolumeInfo;
617 SAL_DLLPUBLIC oslFileError SAL_CALL osl_getVolumeInformation(
618  rtl_uString *pustrDirectoryURL,
619  oslVolumeInfo *pInfo,
620  sal_uInt32 uFieldMask );
622 typedef void *oslFileHandle;
624 /* Open flags */
626 #define osl_File_OpenFlag_Read 0x00000001L
627 #define osl_File_OpenFlag_Write 0x00000002L
628 #define osl_File_OpenFlag_Create 0x00000004L
629 #define osl_File_OpenFlag_NoLock 0x00000008L
630 /* larger bit-fields reserved for internal use cf. detail/file.h */
685 SAL_DLLPUBLIC oslFileError SAL_CALL osl_openFile(
686  rtl_uString *pustrFileURL, oslFileHandle *pHandle, sal_uInt32 uFlags );
688 #define osl_Pos_Absolut 1
689 #define osl_Pos_Current 2
690 #define osl_Pos_End 3
716 SAL_DLLPUBLIC oslFileError SAL_CALL osl_setFilePos(
717  oslFileHandle Handle, sal_uInt32 uHow, sal_Int64 uPos ) SAL_WARN_UNUSED_RESULT;
737 SAL_DLLPUBLIC oslFileError SAL_CALL osl_getFilePos(
738  oslFileHandle Handle, sal_uInt64 *pPos );
761 SAL_DLLPUBLIC oslFileError SAL_CALL osl_setFileSize(
762  oslFileHandle Handle, sal_uInt64 uSize );
784 SAL_DLLPUBLIC oslFileError SAL_CALL osl_getFileSize(
785  oslFileHandle Handle, sal_uInt64 *pSize );
793 #define osl_File_MapFlag_RandomAccess ((sal_uInt32)(0x1))
805 #define osl_File_MapFlag_WillNeed ((sal_uInt32)(0x2))
847 SAL_DLLPUBLIC oslFileError SAL_CALL osl_mapFile (
848  oslFileHandle Handle,
849  void** ppAddr,
850  sal_uInt64 uLength,
851  sal_uInt64 uOffset,
852  sal_uInt32 uFlags
853 );
856 #ifndef ANDROID
869 SAL_DLLPUBLIC oslFileError SAL_CALL osl_unmapFile (
870  void* pAddr,
871  sal_uInt64 uLength
872 );
874 #endif
887 SAL_DLLPUBLIC oslFileError SAL_CALL osl_unmapMappedFile (
888  oslFileHandle Handle,
889  void* pAddr,
890  sal_uInt64 uLength
891 );
926 SAL_DLLPUBLIC oslFileError SAL_CALL osl_readFile(
927  oslFileHandle Handle, void *pBuffer, sal_uInt64 uBytesRequested, sal_uInt64 *pBytesRead );
952 SAL_DLLPUBLIC oslFileError SAL_CALL osl_isEndOfFile(
953  oslFileHandle Handle, sal_Bool *pIsEOF );
990 SAL_DLLPUBLIC oslFileError SAL_CALL osl_writeFile(
991  oslFileHandle Handle, const void *pBuffer, sal_uInt64 uBytesToWrite, sal_uInt64 *pBytesWritten );
1024 SAL_DLLPUBLIC oslFileError SAL_CALL osl_readFileAt(
1025  oslFileHandle Handle,
1026  sal_uInt64 uOffset,
1027  void* pBuffer,
1028  sal_uInt64 uBytesRequested,
1029  sal_uInt64* pBytesRead
1030 );
1066 SAL_DLLPUBLIC oslFileError SAL_CALL osl_writeFileAt(
1067  oslFileHandle Handle,
1068  sal_uInt64 uOffset,
1069  const void* pBuffer,
1070  sal_uInt64 uBytesToWrite,
1071  sal_uInt64* pBytesWritten
1072 );
1099 SAL_DLLPUBLIC oslFileError SAL_CALL osl_readLine(
1100  oslFileHandle Handle, sal_Sequence** ppSequence );
1123 SAL_DLLPUBLIC oslFileError SAL_CALL osl_syncFile( oslFileHandle Handle );
1140 SAL_DLLPUBLIC oslFileError SAL_CALL osl_closeFile( oslFileHandle Handle );
1167 SAL_DLLPUBLIC oslFileError SAL_CALL osl_createDirectory( rtl_uString* pustrDirectoryURL );
1183 SAL_DLLPUBLIC oslFileError SAL_CALL osl_createDirectoryWithFlags(
1184  rtl_uString * url, sal_uInt32 flags);
1211 SAL_DLLPUBLIC oslFileError SAL_CALL osl_removeDirectory( rtl_uString* pustrDirectoryURL );
1228 typedef void (SAL_CALL *oslDirectoryCreationCallbackFunc)(void* pData, rtl_uString* aDirectoryUrl);
1273 SAL_DLLPUBLIC oslFileError SAL_CALL osl_createDirectoryPath(
1274  rtl_uString* aDirectoryUrl,
1275  oslDirectoryCreationCallbackFunc aDirectoryCreationCallbackFunc,
1276  void* pData);
1304 SAL_DLLPUBLIC oslFileError SAL_CALL osl_removeFile(
1305  rtl_uString* pustrFileURL );
1333 SAL_DLLPUBLIC oslFileError SAL_CALL osl_copyFile(
1334  rtl_uString* pustrSourceFileURL, rtl_uString *pustrDestFileURL );
1360 SAL_DLLPUBLIC oslFileError SAL_CALL osl_moveFile(
1361  rtl_uString* pustrSourceFileURL, rtl_uString *pustrDestFileURL );
1382 SAL_DLLPUBLIC oslFileError SAL_CALL osl_getCanonicalName(
1383  rtl_uString *pustrRequestedURL, rtl_uString **ppustrValidURL);
1418 SAL_DLLPUBLIC oslFileError SAL_CALL osl_getAbsoluteFileURL(
1419  rtl_uString* pustrBaseDirectoryURL,
1420  rtl_uString *pustrRelativeFileURL,
1421  rtl_uString **ppustrAbsoluteFileURL );
1436 SAL_DLLPUBLIC oslFileError SAL_CALL osl_getFileURLFromSystemPath(
1437  rtl_uString *pustrSystemPath, rtl_uString **ppustrFileURL);
1469 SAL_DLLPUBLIC oslFileError SAL_CALL osl_searchFileURL(
1470  rtl_uString *pustrFileName, rtl_uString *pustrSearchPath, rtl_uString **ppustrFileURL );
1485 SAL_DLLPUBLIC oslFileError SAL_CALL osl_getSystemPathFromFileURL(
1486  rtl_uString *pustrFileURL, rtl_uString **ppustrSystemPath);
1499 typedef sal_uInt32 (SAL_CALL *oslCalcTextWidthFunc)( rtl_uString *ustrText );
1520 SAL_DLLPUBLIC oslFileError SAL_CALL osl_abbreviateSystemPath(
1521  rtl_uString *ustrSystemPath,
1522  rtl_uString **pustrCompacted,
1523  sal_uInt32 uMaxWidth,
1524  oslCalcTextWidthFunc pCalcWidth );
1539 SAL_DLLPUBLIC oslFileError SAL_CALL osl_setFileAttributes(
1540  rtl_uString *pustrFileURL, sal_uInt64 uAttributes );
1562 SAL_DLLPUBLIC oslFileError SAL_CALL osl_setFileTime(
1563  rtl_uString *pustrFileURL,
1564  const TimeValue *aCreationTime,
1565  const TimeValue *aLastAccessTime,
1566  const TimeValue *aLastWriteTime);
1576 SAL_DLLPUBLIC oslFileError SAL_CALL osl_getTempDirURL(
1577  rtl_uString **pustrTempDirURL );
1628 SAL_DLLPUBLIC oslFileError SAL_CALL osl_createTempFile(
1629  rtl_uString* pustrDirectoryURL,
1630  oslFileHandle* pHandle,
1631  rtl_uString** ppustrTempFileURL);
1633 #ifdef __cplusplus
1634 }
1635 #endif
1637 #endif // INCLUDED_OSL_FILE_H
1639 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_uInt32 uStructSize
Must be initialized with the size in bytes of the structure before passing it to any function...
Definition: file.h:559
SAL_DLLPUBLIC oslFileError osl_getTempDirURL(rtl_uString **pustrTempDirURL)
Retrieves the file URL of the system&#39;s temporary directory path.
Definition: file.h:131
SAL_DLLPUBLIC oslFileError osl_unmapMappedFile(oslFileHandle Handle, void *pAddr, sal_uInt64 uLength)
Unmap a file segment from memory.
Definition: saldllapi.h:30
SAL_DLLPUBLIC oslFileError osl_readLine(oslFileHandle Handle, sal_Sequence **ppSequence)
Read a line from a file.
Definition: file.h:114
Definition: file.h:122
Definition: file.h:99
oslVolumeDeviceHandle * pDeviceHandle
Pointer to handle the receives underlying device.
Definition: file.h:580
Definition: file.h:97
TimeValue aAccessTime
Last access time in nanoseconds since 1/1/1970.
Definition: file.h:390
Definition: file.h:111
SAL_DLLPUBLIC oslFileError osl_setFileAttributes(rtl_uString *pustrFileURL, sal_uInt64 uAttributes)
Set file attributes.
Definition: file.h:89
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.
Definition: file.h:322
Definition: file.h:134
SAL_DLLPUBLIC oslFileError osl_releaseVolumeDeviceHandle(oslVolumeDeviceHandle Handle)
Release a volume device handle.
sal_uInt32 uValidFields
Determines which members of the structure contain valid data.
Definition: file.h:561
Definition: file.h:125
TimeValue aModifyTime
Last modify time in nanoseconds since 1/1/1970.
Definition: file.h:392
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.h:126
Definition: file.h:326
SAL_DLLPUBLIC oslFileError osl_getVolumeDeviceMountPath(oslVolumeDeviceHandle Handle, rtl_uString **ppustrDirectoryURL)
Get the full qualified URL where a device is mounted to.
void * oslDirectory
Definition: file.h:137
void * oslFileHandle
Definition: file.h:622
Definition: file.h:113
Definition: file.h:92
Definition: file.h:95
sal_uInt64 uFreeSpace
Free space on the volume for the current process/user.
Definition: file.h:569
Definition: file.h:90
SAL_DLLPUBLIC oslFileError osl_createDirectoryPath(rtl_uString *aDirectoryUrl, oslDirectoryCreationCallbackFunc aDirectoryCreationCallbackFunc, void *pData)
Create a directory path.
Definition: file.h:109
SAL_DLLPUBLIC oslFileError osl_setFileTime(rtl_uString *pustrFileURL, const TimeValue *aCreationTime, const TimeValue *aLastAccessTime, const TimeValue *aLastWriteTime)
Set the file time.
Definition: file.h:325
struct _oslFileStatus oslFileStatus
Structure containing information about files and directories.
Definition: file.h:94
Definition: file.h:91
Definition: file.h:88
#define SAL_MAX_ENUM
Definition: types.h:228
Definition: file.h:104
SAL_DLLPUBLIC oslFileError osl_getFilePos(oslFileHandle Handle, sal_uInt64 *pPos)
Retrieve the current position of the internal pointer of an open file.
Definition: file.h:110
void(* oslDirectoryCreationCallbackFunc)(void *pData, rtl_uString *aDirectoryUrl)
Function pointer representing a function that will be called by osl_createDirectoryPath if a director...
Definition: file.h:1228
SAL_DLLPUBLIC oslFileError osl_unmapFile(void *pAddr, sal_uInt64 uLength)
Unmap a shared file from memory.
Definition: file.h:324
SAL_DLLPUBLIC oslFileError osl_getNextDirectoryItem(oslDirectory Directory, oslDirectoryItem *pItem, sal_uInt32 uHint)
Retrieve the next item of a previously opened directory.
sal_uInt32 uValidFields
Determines which members of the structure contain valid data.
Definition: file.h:380
unsigned char sal_Bool
Definition: types.h:39
Definition: file.h:107
TimeValue aCreationTime
First creation time in nanoseconds since 1/1/1970.
Definition: file.h:387
oslFileType eType
The type of the file (file, directory, volume).
Definition: file.h:382
rtl_uString * ustrFileName
Case correct name of the file.
Definition: file.h:397
sal_uInt32(* oslCalcTextWidthFunc)(rtl_uString *ustrText)
Function pointer representing the function called back from osl_abbreviateSystemPath.
Definition: file.h:1499
Definition: file.h:102
struct _oslVolumeInfo oslVolumeInfo
Structure containing information about volumes.
Definition: file.h:96
Definition: file.h:132
SAL_DLLPUBLIC oslFileError osl_isEndOfFile(oslFileHandle Handle, sal_Bool *pIsEOF)
Test if the end of a file is reached.
Definition: file.h:323
Definition: file.h:328
SAL_DLLPUBLIC oslFileError osl_readFileAt(oslFileHandle Handle, sal_uInt64 uOffset, void *pBuffer, sal_uInt64 uBytesRequested, sal_uInt64 *pBytesRead)
Read a number of bytes from a specified offset in a file.
Definition: file.h:118
SAL_DLLPUBLIC oslFileError osl_mapFile(oslFileHandle Handle, void **ppAddr, sal_uInt64 uLength, sal_uInt64 uOffset, sal_uInt32 uFlags)
Map a shared file into memory.
SAL_DLLPUBLIC oslFileError osl_getFileStatus(oslDirectoryItem Item, oslFileStatus *pStatus, sal_uInt32 uFieldMask)
Retrieve information about a single file or directory.
rtl_uString * ustrLinkTargetURL
Full URL of the target file if the file itself is a link.
Definition: file.h:404
Definition: file.h:106
Use this as markup for functions and methods whose return value must be checked.
Definition: types.h:307
Definition: file.h:120
SAL_DLLPUBLIC oslFileError osl_openDirectory(rtl_uString *pustrDirectoryURL, oslDirectory *pDirectory)
Open a directory for enumerating its contents.
sal_uInt32 uMaxNameLength
Maximum length of file name of a single item.
Definition: file.h:571
SAL_DLLPUBLIC oslFileError osl_abbreviateSystemPath(rtl_uString *ustrSystemPath, rtl_uString **pustrCompacted, sal_uInt32 uMaxWidth, oslCalcTextWidthFunc pCalcWidth)
Abbreviate a system notation path.
sal_uInt64 uUsedSpace
Used space on the volume for the current process/user.
Definition: file.h:567
void * oslDirectoryItem
Definition: file.h:138
Definition: file.h:128
SAL_DLLPUBLIC oslFileError osl_removeFile(rtl_uString *pustrFileURL)
Remove a regular file.
void * oslVolumeDeviceHandle
Definition: file.h:448
sal_uInt32 uStructSize
Must be initialized with the size in bytes of the structure before passing it to any function...
Definition: file.h:378
SAL_DLLPUBLIC oslFileError osl_getFileURLFromSystemPath(rtl_uString *pustrSystemPath, rtl_uString **ppustrFileURL)
Convert a system dependent path into a file URL.
Definition: file.h:85
Definition: file.h:93
Definition: file.h:87
sal_uInt64 uTotalSpace
Total available space on the volume for the current process/user.
Definition: file.h:565
Definition: file.h:330
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 oslFileError osl_syncFile(oslFileHandle Handle)
Synchronize the memory representation of a file with that on the physical medium. ...
SAL_DLLPUBLIC oslFileError osl_acquireVolumeDeviceHandle(oslVolumeDeviceHandle Handle)
Acquire a volume device handle.
Definition: file.h:108
Definition: file.h:117
Definition: file.h:101
This is the binary specification of a SAL sequence.
Definition: types.h:327
SAL_DLLPUBLIC oslFileError osl_releaseDirectoryItem(oslDirectoryItem Item)
Decrease the refcount of a directory item handle.
SAL_DLLPUBLIC oslFileError osl_closeDirectory(oslDirectory Directory)
Release a directory handle.
Definition: file.h:105
Definition: file.h:327
SAL_DLLPUBLIC oslFileError osl_getFileSize(oslFileHandle Handle, sal_uInt64 *pSize)
Get the file size of an open file.
Definition: time.h:66
SAL_DLLPUBLIC sal_Bool osl_identicalDirectoryItem(oslDirectoryItem pItemA, oslDirectoryItem pItemB)
Determine if two directory items point the same underlying file.
Definition: file.h:124
Definition: file.h:329
Definition: file.h:121
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.
SAL_DLLPUBLIC oslFileError osl_setFileSize(oslFileHandle Handle, sal_uInt64 uSize)
Set the file size of an open file.
rtl_uString * ustrFileSystemName
Points to a string that receives the name of the file system type.
Definition: file.h:577
sal_uInt32 uMaxPathLength
Maximum length of a full qualified path in system notation.
Definition: file.h:573
SAL_DLLPUBLIC oslFileError osl_acquireDirectoryItem(oslDirectoryItem Item)
Increase the refcount of a directory item handle.
SAL_DLLPUBLIC oslFileError osl_createDirectory(rtl_uString *pustrDirectoryURL)
Create a directory.
Structure containing information about volumes.
Definition: file.h:556
Definition: file.h:129
SAL_DLLPUBLIC oslFileError osl_searchFileURL(rtl_uString *pustrFileName, rtl_uString *pustrSearchPath, rtl_uString **ppustrFileURL)
Search a full qualified system path or a file URL.
Definition: file.h:112
SAL_DLLPUBLIC oslFileError osl_createDirectoryWithFlags(rtl_uString *url, sal_uInt32 flags)
Create a directory, passing flags.
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_getDirectoryItem(rtl_uString *pustrFileURL, oslDirectoryItem *pItem)
Retrieve a single directory item.
SAL_DLLPUBLIC oslFileError osl_copyFile(rtl_uString *pustrSourceFileURL, rtl_uString *pustrDestFileURL)
Copy a file to a new destination.
Definition: file.h:115
SAL_DLLPUBLIC oslFileError osl_closeFile(oslFileHandle Handle)
Close an open file.
Definition: file.h:98
Definition: file.h:119
Definition: file.h:103
rtl_uString * ustrFileURL
Full URL of the file.
Definition: file.h:400
Definition: file.h:133
SAL_DLLPUBLIC oslFileError osl_getVolumeInformation(rtl_uString *pustrDirectoryURL, oslVolumeInfo *pInfo, sal_uInt32 uFieldMask)
Retrieve information about a volume.
SAL_DLLPUBLIC oslFileError osl_openFile(rtl_uString *pustrFileURL, oslFileHandle *pHandle, sal_uInt32 uFlags)
Open a regular file.
SAL_DLLPUBLIC oslFileError osl_writeFileAt(oslFileHandle Handle, sal_uInt64 uOffset, const void *pBuffer, sal_uInt64 uBytesToWrite, sal_uInt64 *pBytesWritten)
Write a number of bytes to a specified offset in a file.
Definition: file.h:86
Definition: file.h:127
sal_uInt32 uAttributes
Attributes of the volume (remote and/or removable)
Definition: file.h:563
Definition: file.h:123
Definition: file.h:100
Definition: file.h:130
SAL_DLLPUBLIC oslFileError osl_getCanonicalName(rtl_uString *pustrRequestedURL, rtl_uString **ppustrValidURL)
Determine a valid unused canonical name for a requested name.
SAL_DLLPUBLIC oslFileError osl_removeDirectory(rtl_uString *pustrDirectoryURL)
Remove an empty directory.
sal_uInt64 uFileSize
Size in bytes of the file.
Definition: file.h:394
sal_uInt64 uAttributes
File attributes.
Definition: file.h:384
SAL_DLLPUBLIC oslFileError osl_getSystemPathFromFileURL(rtl_uString *pustrFileURL, rtl_uString **ppustrSystemPath)
Convert a file URL into a system dependent path.
Definition: file.h:116
SAL_DLLPUBLIC oslFileError osl_writeFile(oslFileHandle Handle, const void *pBuffer, sal_uInt64 uBytesToWrite, sal_uInt64 *pBytesWritten)
Write a number of bytes to a file.
Structure containing information about files and directories.
Definition: file.h:376