LibreOffice LibreOffice 26.2 SDK C/C++ API Reference

Loading...
Searching...
No Matches
file.h
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/*
21 * This file is part of LibreOffice published API.
22 */
23
24#ifndef INCLUDED_OSL_FILE_H
25#define INCLUDED_OSL_FILE_H
26
27#include "sal/config.h"
28
29#include "osl/time.h"
30#include "rtl/ustring.h"
31#include "sal/saldllapi.h"
32
33#ifdef __cplusplus
34 extern "C" {
35#endif
36
87
88/* Error codes according to errno */
89 typedef enum {
90 osl_File_E_None,
91 osl_File_E_PERM,
92 osl_File_E_NOENT,
93 osl_File_E_SRCH,
94 osl_File_E_INTR,
95 osl_File_E_IO,
96 osl_File_E_NXIO,
97 osl_File_E_2BIG,
98 osl_File_E_NOEXEC,
99 osl_File_E_BADF,
100 osl_File_E_CHILD,
101 osl_File_E_AGAIN,
102 osl_File_E_NOMEM,
103 osl_File_E_ACCES,
104 osl_File_E_FAULT,
105 osl_File_E_BUSY,
106 osl_File_E_EXIST,
107 osl_File_E_XDEV,
108 osl_File_E_NODEV,
109 osl_File_E_NOTDIR,
110 osl_File_E_ISDIR,
111 osl_File_E_INVAL,
112 osl_File_E_NFILE,
113 osl_File_E_MFILE,
114 osl_File_E_NOTTY,
115 osl_File_E_FBIG,
116 osl_File_E_NOSPC,
117 osl_File_E_SPIPE,
118 osl_File_E_ROFS,
119 osl_File_E_MLINK,
120 osl_File_E_PIPE,
121 osl_File_E_DOM,
122 osl_File_E_RANGE,
123 osl_File_E_DEADLK,
124 osl_File_E_NAMETOOLONG,
125 osl_File_E_NOLCK,
126 osl_File_E_NOSYS,
127 osl_File_E_NOTEMPTY,
128 osl_File_E_LOOP,
129 osl_File_E_ILSEQ,
130 osl_File_E_NOLINK,
131 osl_File_E_MULTIHOP,
132 osl_File_E_USERS,
133 osl_File_E_OVERFLOW,
134 osl_File_E_NOTREADY,
135 osl_File_E_invalidError,
136 osl_File_E_TIMEDOUT,
137 osl_File_E_NETWORK,
140 osl_File_E_FORCE_EQUAL_SIZE = SAL_MAX_ENUM
141} oslFileError;
142
143 typedef void *oslDirectory;
144 typedef void *oslDirectoryItem;
145
169 SAL_DLLPUBLIC oslFileError SAL_CALL osl_openDirectory(
170 rtl_uString *pustrDirectoryURL, oslDirectory *pDirectory);
171
201 SAL_DLLPUBLIC oslFileError SAL_CALL osl_getNextDirectoryItem(
202 oslDirectory Directory,
203 oslDirectoryItem *pItem,
204 sal_uInt32 uHint
205 );
206
220 SAL_DLLPUBLIC oslFileError SAL_CALL osl_closeDirectory(
221 oslDirectory Directory);
222
257 SAL_DLLPUBLIC oslFileError SAL_CALL osl_getDirectoryItem(
258 rtl_uString *pustrFileURL,
259 oslDirectoryItem *pItem
260 );
261
277 SAL_DLLPUBLIC oslFileError SAL_CALL osl_acquireDirectoryItem(
278 oslDirectoryItem Item );
279
280
298 SAL_DLLPUBLIC oslFileError SAL_CALL osl_releaseDirectoryItem(
299 oslDirectoryItem Item );
300
319 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_identicalDirectoryItem(
320 oslDirectoryItem pItemA,
321 oslDirectoryItem pItemB );
322
328 typedef enum {
329 osl_File_Type_Directory, /*< directory */
330 osl_File_Type_Volume, /*< volume (e.g. C:, A:) */
331 osl_File_Type_Regular, /*< regular file */
332 osl_File_Type_Fifo, /*< named pipe */
333 osl_File_Type_Socket, /*< socket */
334 osl_File_Type_Link, /*< file link */
335 osl_File_Type_Special, /*< special device file */
336 osl_File_Type_Unknown /*< unknown file type */
337} oslFileType;
338
339
345#define osl_File_Attribute_ReadOnly 0x00000001
346#define osl_File_Attribute_Hidden 0x00000002
347#define osl_File_Attribute_Executable 0x00000010
348#define osl_File_Attribute_GrpWrite 0x00000020
349#define osl_File_Attribute_GrpRead 0x00000040
350#define osl_File_Attribute_GrpExe 0x00000080
351#define osl_File_Attribute_OwnWrite 0x00000100
352#define osl_File_Attribute_OwnRead 0x00000200
353#define osl_File_Attribute_OwnExe 0x00000400
354#define osl_File_Attribute_OthWrite 0x00000800
355#define osl_File_Attribute_OthRead 0x00001000
356#define osl_File_Attribute_OthExe 0x00002000
358
364#define osl_FileStatus_Mask_Type 0x00000001
365#define osl_FileStatus_Mask_Attributes 0x00000002
366#define osl_FileStatus_Mask_CreationTime 0x00000010
367#define osl_FileStatus_Mask_AccessTime 0x00000020
368#define osl_FileStatus_Mask_ModifyTime 0x00000040
369#define osl_FileStatus_Mask_FileSize 0x00000080
370#define osl_FileStatus_Mask_FileName 0x00000100
371#define osl_FileStatus_Mask_FileURL 0x00000200
372#define osl_FileStatus_Mask_LinkTargetURL 0x00000400
373#define osl_FileStatus_Mask_All 0x7FFFFFFF
374#define osl_FileStatus_Mask_Validate 0x80000000
376
382 typedef struct _oslFileStatus {
384 sal_uInt32 uStructSize;
386 sal_uInt32 uValidFields;
388 oslFileType eType;
390 sal_uInt64 uAttributes;
393 TimeValue aCreationTime;
396 TimeValue aAccessTime;
398 TimeValue aModifyTime;
400 sal_uInt64 uFileSize;
403 rtl_uString *ustrFileName;
406 rtl_uString *ustrFileURL;
410 rtl_uString *ustrLinkTargetURL;
411} oslFileStatus;
412
451 SAL_DLLPUBLIC oslFileError SAL_CALL osl_getFileStatus(
452 oslDirectoryItem Item, oslFileStatus *pStatus, sal_uInt32 uFieldMask );
453
454 typedef void *oslVolumeDeviceHandle;
455
473 SAL_DLLPUBLIC oslFileError SAL_CALL osl_releaseVolumeDeviceHandle(
474 oslVolumeDeviceHandle Handle );
475
493 SAL_DLLPUBLIC oslFileError SAL_CALL osl_acquireVolumeDeviceHandle(
494 oslVolumeDeviceHandle Handle );
495
520 SAL_DLLPUBLIC oslFileError SAL_CALL osl_getVolumeDeviceMountPath(
521 oslVolumeDeviceHandle Handle, rtl_uString **ppustrDirectoryURL);
522
528#define osl_Volume_Attribute_Removeable 0x00000001
529#define osl_Volume_Attribute_Remote 0x00000002
530#define osl_Volume_Attribute_CompactDisc 0x00000004
531#define osl_Volume_Attribute_FixedDisk 0x00000008
532#define osl_Volume_Attribute_RAMDisk 0x00000010
533#define osl_Volume_Attribute_FloppyDisk 0x00000020
534
535#define osl_Volume_Attribute_Case_Is_Preserved 0x00000040
536#define osl_Volume_Attribute_Case_Sensitive 0x00000080
537
539
545
546#define osl_VolumeInfo_Mask_Attributes 0x00000001
547#define osl_VolumeInfo_Mask_TotalSpace 0x00000002
548#define osl_VolumeInfo_Mask_UsedSpace 0x00000004
549#define osl_VolumeInfo_Mask_FreeSpace 0x00000008
550#define osl_VolumeInfo_Mask_MaxNameLength 0x00000010
551#define osl_VolumeInfo_Mask_MaxPathLength 0x00000020
552#define osl_VolumeInfo_Mask_FileSystemName 0x00000040
553#define osl_VolumeInfo_Mask_DeviceHandle 0x00000080
554#define osl_VolumeInfo_Mask_FileSystemCaseHandling 0x00000100
555
557
563
564 typedef struct _oslVolumeInfo {
567 sal_uInt32 uStructSize;
569 sal_uInt32 uValidFields;
571 sal_uInt32 uAttributes;
573 sal_uInt64 uTotalSpace;
575 sal_uInt64 uUsedSpace;
577 sal_uInt64 uFreeSpace;
579 sal_uInt32 uMaxNameLength;
581 sal_uInt32 uMaxPathLength;
585 rtl_uString *ustrFileSystemName;
588 oslVolumeDeviceHandle *pDeviceHandle;
589} oslVolumeInfo;
590
625 SAL_DLLPUBLIC oslFileError SAL_CALL osl_getVolumeInformation(
626 rtl_uString *pustrDirectoryURL,
627 oslVolumeInfo *pInfo,
628 sal_uInt32 uFieldMask );
629
630 typedef void *oslFileHandle;
631
632/* Open flags */
633
634#define osl_File_OpenFlag_Read 0x00000001
635#define osl_File_OpenFlag_Write 0x00000002
636#define osl_File_OpenFlag_Create 0x00000004
637#define osl_File_OpenFlag_NoLock 0x00000008
638/* larger bit-fields reserved for internal use cf. detail/file.h */
639
693 SAL_DLLPUBLIC oslFileError SAL_CALL osl_openFile(
694 rtl_uString *pustrFileURL, oslFileHandle *pHandle, sal_uInt32 uFlags );
695
696#define osl_Pos_Absolut 1
697#define osl_Pos_Current 2
698#define osl_Pos_End 3
699
724 SAL_WARN_UNUSED_RESULT SAL_DLLPUBLIC oslFileError SAL_CALL osl_setFilePos(
725 oslFileHandle Handle, sal_uInt32 uHow, sal_Int64 uPos );
726
745 SAL_DLLPUBLIC oslFileError SAL_CALL osl_getFilePos(
746 oslFileHandle Handle, sal_uInt64 *pPos );
747
769 SAL_DLLPUBLIC oslFileError SAL_CALL osl_setFileSize(
770 oslFileHandle Handle, sal_uInt64 uSize );
771
792 SAL_DLLPUBLIC oslFileError SAL_CALL osl_getFileSize(
793 oslFileHandle Handle, sal_uInt64 *pSize );
794
801#define osl_File_MapFlag_RandomAccess ((sal_uInt32)(0x1))
802
813#define osl_File_MapFlag_WillNeed ((sal_uInt32)(0x2))
814
855 SAL_DLLPUBLIC oslFileError SAL_CALL osl_mapFile (
856 oslFileHandle Handle,
857 void** ppAddr,
858 sal_uInt64 uLength,
859 sal_uInt64 uOffset,
860 sal_uInt32 uFlags
861);
862
863
864#ifndef ANDROID
865
877 SAL_DLLPUBLIC oslFileError SAL_CALL osl_unmapFile (
878 void* pAddr,
879 sal_uInt64 uLength
880);
881
882#endif
883
895 SAL_DLLPUBLIC oslFileError SAL_CALL osl_unmapMappedFile (
896 oslFileHandle Handle,
897 void* pAddr,
898 sal_uInt64 uLength
899);
900
934 SAL_DLLPUBLIC oslFileError SAL_CALL osl_readFile(
935 oslFileHandle Handle, void *pBuffer, sal_uInt64 uBytesRequested, sal_uInt64 *pBytesRead );
936
960 SAL_DLLPUBLIC oslFileError SAL_CALL osl_isEndOfFile(
961 oslFileHandle Handle, sal_Bool *pIsEOF );
962
998 SAL_DLLPUBLIC oslFileError SAL_CALL osl_writeFile(
999 oslFileHandle Handle, const void *pBuffer, sal_uInt64 uBytesToWrite, sal_uInt64 *pBytesWritten );
1000
1032 SAL_DLLPUBLIC oslFileError SAL_CALL osl_readFileAt(
1033 oslFileHandle Handle,
1034 sal_uInt64 uOffset,
1035 void* pBuffer,
1036 sal_uInt64 uBytesRequested,
1037 sal_uInt64* pBytesRead
1038);
1039
1074 SAL_DLLPUBLIC oslFileError SAL_CALL osl_writeFileAt(
1075 oslFileHandle Handle,
1076 sal_uInt64 uOffset,
1077 const void* pBuffer,
1078 sal_uInt64 uBytesToWrite,
1079 sal_uInt64* pBytesWritten
1080);
1081
1107 SAL_DLLPUBLIC oslFileError SAL_CALL osl_readLine(
1108 oslFileHandle Handle, sal_Sequence** ppSequence );
1109
1131 SAL_DLLPUBLIC oslFileError SAL_CALL osl_syncFile( oslFileHandle Handle );
1132
1148 SAL_DLLPUBLIC oslFileError SAL_CALL osl_closeFile( oslFileHandle Handle );
1149
1175 SAL_DLLPUBLIC oslFileError SAL_CALL osl_createDirectory( rtl_uString* pustrDirectoryURL );
1176
1191 SAL_DLLPUBLIC oslFileError SAL_CALL osl_createDirectoryWithFlags(
1192 rtl_uString * url, sal_uInt32 flags);
1193
1219 SAL_DLLPUBLIC oslFileError SAL_CALL osl_removeDirectory( rtl_uString* pustrDirectoryURL );
1220
1236 typedef void (SAL_CALL *oslDirectoryCreationCallbackFunc)(void* pData, rtl_uString* aDirectoryUrl);
1237
1281 SAL_DLLPUBLIC oslFileError SAL_CALL osl_createDirectoryPath(
1282 rtl_uString* aDirectoryUrl,
1283 oslDirectoryCreationCallbackFunc aDirectoryCreationCallbackFunc,
1284 void* pData);
1285
1311 SAL_DLLPUBLIC oslFileError SAL_CALL osl_removeFile(
1312 rtl_uString* pustrFileURL );
1313
1340 SAL_DLLPUBLIC oslFileError SAL_CALL osl_copyFile(
1341 rtl_uString* pustrSourceFileURL, rtl_uString *pustrDestFileURL );
1342
1367 SAL_DLLPUBLIC oslFileError SAL_CALL osl_moveFile(
1368 rtl_uString* pustrSourceFileURL, rtl_uString *pustrDestFileURL );
1369
1389 SAL_DLLPUBLIC oslFileError SAL_CALL osl_getCanonicalName(
1390 rtl_uString *pustrRequestedURL, rtl_uString **ppustrValidURL);
1391
1425 SAL_DLLPUBLIC oslFileError SAL_CALL osl_getAbsoluteFileURL(
1426 rtl_uString* pustrBaseDirectoryURL,
1427 rtl_uString *pustrRelativeFileURL,
1428 rtl_uString **ppustrAbsoluteFileURL );
1429
1443 SAL_DLLPUBLIC oslFileError SAL_CALL osl_getFileURLFromSystemPath(
1444 rtl_uString *pustrSystemPath, rtl_uString **ppustrFileURL);
1445
1476 SAL_DLLPUBLIC oslFileError SAL_CALL osl_searchFileURL(
1477 rtl_uString *pustrFileName, rtl_uString *pustrSearchPath, rtl_uString **ppustrFileURL );
1478
1492 SAL_DLLPUBLIC oslFileError SAL_CALL osl_getSystemPathFromFileURL(
1493 rtl_uString *pustrFileURL, rtl_uString **ppustrSystemPath);
1494
1506 typedef sal_uInt32 (SAL_CALL *oslCalcTextWidthFunc)( rtl_uString *ustrText );
1507
1527 SAL_DLLPUBLIC oslFileError SAL_CALL osl_abbreviateSystemPath(
1528 rtl_uString *ustrSystemPath,
1529 rtl_uString **pustrCompacted,
1530 sal_uInt32 uMaxWidth,
1531 oslCalcTextWidthFunc pCalcWidth );
1532
1546 SAL_DLLPUBLIC oslFileError SAL_CALL osl_setFileAttributes(
1547 rtl_uString *pustrFileURL, sal_uInt64 uAttributes );
1548
1569 SAL_DLLPUBLIC oslFileError SAL_CALL osl_setFileTime(
1570 rtl_uString *pustrFileURL,
1571 const TimeValue *aCreationTime,
1572 const TimeValue *aLastAccessTime,
1573 const TimeValue *aLastWriteTime);
1574
1583 SAL_DLLPUBLIC oslFileError SAL_CALL osl_getTempDirURL(
1584 rtl_uString **pustrTempDirURL );
1585
1635 SAL_DLLPUBLIC oslFileError SAL_CALL osl_createTempFile(
1636 rtl_uString* pustrDirectoryURL,
1637 oslFileHandle* pHandle,
1638 rtl_uString** ppustrTempFileURL);
1639
1668 SAL_DLLPUBLIC oslFileError SAL_CALL osl_replaceFile(rtl_uString* pustrSourceFileURL,
1669 rtl_uString* pustrDestFileURL);
1670
1671#ifdef __cplusplus
1672}
1673#endif
1674
1675#endif // INCLUDED_OSL_FILE_H
1676
1677/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SAL_MAX_ENUM
#define SAL_MAX_ENUM
Definition types.h:205
sal_Sequence
struct _sal_Sequence sal_Sequence
This is the binary specification of a SAL sequence.
sal_Bool
unsigned char sal_Bool
Definition types.h:38
SAL_WARN_UNUSED_RESULT
#define SAL_WARN_UNUSED_RESULT
Use this as markup for functions and methods whose return value must be used.
Definition types.h:288
config.h
saldllapi.h
SAL_DLLPUBLIC
#define SAL_DLLPUBLIC
Definition saldllapi.h:34
ustring.h
osl_identicalDirectoryItem
SAL_DLLPUBLIC sal_Bool osl_identicalDirectoryItem(oslDirectoryItem pItemA, oslDirectoryItem pItemB)
Determine if two directory items point the same underlying file.
osl_acquireDirectoryItem
SAL_DLLPUBLIC oslFileError osl_acquireDirectoryItem(oslDirectoryItem Item)
Increase the refcount of a directory item handle.
osl_releaseDirectoryItem
SAL_DLLPUBLIC oslFileError osl_releaseDirectoryItem(oslDirectoryItem Item)
Decrease the refcount of a directory item handle.
osl_readFile
SAL_DLLPUBLIC oslFileError osl_readFile(oslFileHandle Handle, void *pBuffer, sal_uInt64 uBytesRequested, sal_uInt64 *pBytesRead)
Read a number of bytes from a file.
osl_getFileSize
SAL_DLLPUBLIC oslFileError osl_getFileSize(oslFileHandle Handle, sal_uInt64 *pSize)
Get the file size of an open file.
osl_unmapFile
SAL_DLLPUBLIC oslFileError osl_unmapFile(void *pAddr, sal_uInt64 uLength)
Unmap a shared file from memory.
osl_getFileURLFromSystemPath
SAL_DLLPUBLIC oslFileError osl_getFileURLFromSystemPath(rtl_uString *pustrSystemPath, rtl_uString **ppustrFileURL)
Convert a system dependent path into a file URL.
osl_setFileTime
SAL_DLLPUBLIC oslFileError osl_setFileTime(rtl_uString *pustrFileURL, const TimeValue *aCreationTime, const TimeValue *aLastAccessTime, const TimeValue *aLastWriteTime)
Set the file time.
osl_unmapMappedFile
SAL_DLLPUBLIC oslFileError osl_unmapMappedFile(oslFileHandle Handle, void *pAddr, sal_uInt64 uLength)
Unmap a file segment from memory.
osl_getVolumeInformation
SAL_DLLPUBLIC oslFileError osl_getVolumeInformation(rtl_uString *pustrDirectoryURL, oslVolumeInfo *pInfo, sal_uInt32 uFieldMask)
Retrieve information about a volume.
osl_getVolumeDeviceMountPath
SAL_DLLPUBLIC oslFileError osl_getVolumeDeviceMountPath(oslVolumeDeviceHandle Handle, rtl_uString **ppustrDirectoryURL)
Get the full qualified URL where a device is mounted to.
osl_getDirectoryItem
SAL_DLLPUBLIC oslFileError osl_getDirectoryItem(rtl_uString *pustrFileURL, oslDirectoryItem *pItem)
Retrieve a single directory item.
osl_writeFile
SAL_DLLPUBLIC oslFileError osl_writeFile(oslFileHandle Handle, const void *pBuffer, sal_uInt64 uBytesToWrite, sal_uInt64 *pBytesWritten)
Write a number of bytes to a file.
oslVolumeDeviceHandle
void * oslVolumeDeviceHandle
Definition file.h:454
osl_removeFile
SAL_DLLPUBLIC oslFileError osl_removeFile(rtl_uString *pustrFileURL)
Remove a regular file.
osl_getTempDirURL
SAL_DLLPUBLIC oslFileError osl_getTempDirURL(rtl_uString **pustrTempDirURL)
Retrieves the file URL of the system's temporary directory path.
osl_getFilePos
SAL_DLLPUBLIC oslFileError osl_getFilePos(oslFileHandle Handle, sal_uInt64 *pPos)
Retrieve the current position of the internal pointer of an open file.
osl_writeFileAt
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.
osl_moveFile
SAL_DLLPUBLIC oslFileError osl_moveFile(rtl_uString *pustrSourceFileURL, rtl_uString *pustrDestFileURL)
Move a file or directory to a new destination or renames it.
osl_readFileAt
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.
osl_searchFileURL
SAL_DLLPUBLIC oslFileError osl_searchFileURL(rtl_uString *pustrFileName, rtl_uString *pustrSearchPath, rtl_uString **ppustrFileURL)
Search a full qualified system path or a file URL.
osl_setFilePos
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.
oslFileError
oslFileError
Definition file.h:89
osl_File_E_NOLINK
@ osl_File_E_NOLINK
Definition file.h:130
osl_File_E_DOM
@ osl_File_E_DOM
Definition file.h:121
osl_File_E_MULTIHOP
@ osl_File_E_MULTIHOP
Definition file.h:131
osl_File_E_FORCE_EQUAL_SIZE
@ osl_File_E_FORCE_EQUAL_SIZE
Definition file.h:140
osl_File_E_EXIST
@ osl_File_E_EXIST
Definition file.h:106
osl_File_E_NOSYS
@ osl_File_E_NOSYS
Definition file.h:126
osl_File_E_NXIO
@ osl_File_E_NXIO
Definition file.h:96
osl_File_E_NOENT
@ osl_File_E_NOENT
Definition file.h:92
osl_File_E_MLINK
@ osl_File_E_MLINK
Definition file.h:119
osl_File_E_PERM
@ osl_File_E_PERM
Definition file.h:91
osl_File_E_BUSY
@ osl_File_E_BUSY
Definition file.h:105
osl_File_E_NOMEM
@ osl_File_E_NOMEM
Definition file.h:102
osl_File_E_DEADLK
@ osl_File_E_DEADLK
Definition file.h:123
osl_File_E_TIMEDOUT
@ osl_File_E_TIMEDOUT
Definition file.h:136
osl_File_E_XDEV
@ osl_File_E_XDEV
Definition file.h:107
osl_File_E_NOTTY
@ osl_File_E_NOTTY
Definition file.h:114
osl_File_E_AGAIN
@ osl_File_E_AGAIN
Definition file.h:101
osl_File_E_2BIG
@ osl_File_E_2BIG
Definition file.h:97
osl_File_E_NODEV
@ osl_File_E_NODEV
Definition file.h:108
osl_File_E_ACCES
@ osl_File_E_ACCES
Definition file.h:103
osl_File_E_MFILE
@ osl_File_E_MFILE
Definition file.h:113
osl_File_E_NFILE
@ osl_File_E_NFILE
Definition file.h:112
osl_File_E_BADF
@ osl_File_E_BADF
Definition file.h:99
osl_File_E_ROFS
@ osl_File_E_ROFS
Definition file.h:118
osl_File_E_ISDIR
@ osl_File_E_ISDIR
Definition file.h:110
osl_File_E_OVERFLOW
@ osl_File_E_OVERFLOW
Definition file.h:133
osl_File_E_PIPE
@ osl_File_E_PIPE
Definition file.h:120
osl_File_E_SPIPE
@ osl_File_E_SPIPE
Definition file.h:117
osl_File_E_NAMETOOLONG
@ osl_File_E_NAMETOOLONG
Definition file.h:124
osl_File_E_INTR
@ osl_File_E_INTR
Definition file.h:94
osl_File_E_NOTEMPTY
@ osl_File_E_NOTEMPTY
Definition file.h:127
osl_File_E_CHILD
@ osl_File_E_CHILD
Definition file.h:100
osl_File_E_INVAL
@ osl_File_E_INVAL
Definition file.h:111
osl_File_E_invalidError
@ osl_File_E_invalidError
Definition file.h:135
osl_File_E_ILSEQ
@ osl_File_E_ILSEQ
Definition file.h:129
osl_File_E_RANGE
@ osl_File_E_RANGE
Definition file.h:122
osl_File_E_FBIG
@ osl_File_E_FBIG
Definition file.h:115
osl_File_E_NOTDIR
@ osl_File_E_NOTDIR
Definition file.h:109
osl_File_E_NOTREADY
@ osl_File_E_NOTREADY
Definition file.h:134
osl_File_E_NOLCK
@ osl_File_E_NOLCK
Definition file.h:125
osl_File_E_NOEXEC
@ osl_File_E_NOEXEC
Definition file.h:98
osl_File_E_None
@ osl_File_E_None
Definition file.h:90
osl_File_E_USERS
@ osl_File_E_USERS
Definition file.h:132
osl_File_E_IO
@ osl_File_E_IO
Definition file.h:95
osl_File_E_NOSPC
@ osl_File_E_NOSPC
Definition file.h:116
osl_File_E_NETWORK
@ osl_File_E_NETWORK
Definition file.h:137
osl_File_E_LOOP
@ osl_File_E_LOOP
Definition file.h:128
osl_File_E_SRCH
@ osl_File_E_SRCH
Definition file.h:93
osl_File_E_FAULT
@ osl_File_E_FAULT
Definition file.h:104
osl_createDirectoryWithFlags
SAL_DLLPUBLIC oslFileError osl_createDirectoryWithFlags(rtl_uString *url, sal_uInt32 flags)
Create a directory, passing flags.
osl_openFile
SAL_DLLPUBLIC oslFileError osl_openFile(rtl_uString *pustrFileURL, oslFileHandle *pHandle, sal_uInt32 uFlags)
Open a regular file.
osl_getCanonicalName
SAL_DLLPUBLIC oslFileError osl_getCanonicalName(rtl_uString *pustrRequestedURL, rtl_uString **ppustrValidURL)
Determine a valid unused canonical name for a requested name.
oslDirectory
void * oslDirectory
Definition file.h:143
oslDirectoryCreationCallbackFunc
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:1236
osl_closeDirectory
SAL_DLLPUBLIC oslFileError osl_closeDirectory(oslDirectory Directory)
Release a directory handle.
osl_syncFile
SAL_DLLPUBLIC oslFileError osl_syncFile(oslFileHandle Handle)
Synchronize the memory representation of a file with that on the physical medium.
osl_createDirectory
SAL_DLLPUBLIC oslFileError osl_createDirectory(rtl_uString *pustrDirectoryURL)
Create a directory.
osl_setFileAttributes
SAL_DLLPUBLIC oslFileError osl_setFileAttributes(rtl_uString *pustrFileURL, sal_uInt64 uAttributes)
Set file attributes.
oslFileStatus
struct _oslFileStatus oslFileStatus
Structure containing information about files and directories.
oslDirectoryItem
void * oslDirectoryItem
Definition file.h:144
osl_getFileStatus
SAL_DLLPUBLIC oslFileError osl_getFileStatus(oslDirectoryItem Item, oslFileStatus *pStatus, sal_uInt32 uFieldMask)
Retrieve information about a single file or directory.
osl_createTempFile
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...
oslVolumeInfo
struct _oslVolumeInfo oslVolumeInfo
Structure containing information about volumes.
osl_releaseVolumeDeviceHandle
SAL_DLLPUBLIC oslFileError osl_releaseVolumeDeviceHandle(oslVolumeDeviceHandle Handle)
Release a volume device handle.
osl_setFileSize
SAL_DLLPUBLIC oslFileError osl_setFileSize(oslFileHandle Handle, sal_uInt64 uSize)
Set the file size of an open file.
osl_closeFile
SAL_DLLPUBLIC oslFileError osl_closeFile(oslFileHandle Handle)
Close an open file.
osl_isEndOfFile
SAL_DLLPUBLIC oslFileError osl_isEndOfFile(oslFileHandle Handle, sal_Bool *pIsEOF)
Test if the end of a file is reached.
osl_replaceFile
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).
osl_getNextDirectoryItem
SAL_DLLPUBLIC oslFileError osl_getNextDirectoryItem(oslDirectory Directory, oslDirectoryItem *pItem, sal_uInt32 uHint)
Retrieve the next item of a previously opened directory.
osl_acquireVolumeDeviceHandle
SAL_DLLPUBLIC oslFileError osl_acquireVolumeDeviceHandle(oslVolumeDeviceHandle Handle)
Acquire a volume device handle.
osl_getAbsoluteFileURL
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.
oslCalcTextWidthFunc
sal_uInt32(* oslCalcTextWidthFunc)(rtl_uString *ustrText)
Function pointer representing the function called back from osl_abbreviateSystemPath.
Definition file.h:1506
osl_mapFile
SAL_DLLPUBLIC oslFileError osl_mapFile(oslFileHandle Handle, void **ppAddr, sal_uInt64 uLength, sal_uInt64 uOffset, sal_uInt32 uFlags)
Map a shared file into memory.
osl_abbreviateSystemPath
SAL_DLLPUBLIC oslFileError osl_abbreviateSystemPath(rtl_uString *ustrSystemPath, rtl_uString **pustrCompacted, sal_uInt32 uMaxWidth, oslCalcTextWidthFunc pCalcWidth)
Abbreviate a system notation path.
osl_createDirectoryPath
SAL_DLLPUBLIC oslFileError osl_createDirectoryPath(rtl_uString *aDirectoryUrl, oslDirectoryCreationCallbackFunc aDirectoryCreationCallbackFunc, void *pData)
Create a directory path.
osl_getSystemPathFromFileURL
SAL_DLLPUBLIC oslFileError osl_getSystemPathFromFileURL(rtl_uString *pustrFileURL, rtl_uString **ppustrSystemPath)
Convert a file URL into a system dependent path.
osl_copyFile
SAL_DLLPUBLIC oslFileError osl_copyFile(rtl_uString *pustrSourceFileURL, rtl_uString *pustrDestFileURL)
Copy a file to a new destination.
osl_readLine
SAL_DLLPUBLIC oslFileError osl_readLine(oslFileHandle Handle, sal_Sequence **ppSequence)
Read a line from a file.
osl_removeDirectory
SAL_DLLPUBLIC oslFileError osl_removeDirectory(rtl_uString *pustrDirectoryURL)
Remove an empty directory.
oslFileHandle
void * oslFileHandle
Definition file.h:630
osl_openDirectory
SAL_DLLPUBLIC oslFileError osl_openDirectory(rtl_uString *pustrDirectoryURL, oslDirectory *pDirectory)
Open a directory for enumerating its contents.
time.h
oslFileType
oslFileType
Definition file.h:328
osl_File_Type_Link
@ osl_File_Type_Link
Definition file.h:334
osl_File_Type_Directory
@ osl_File_Type_Directory
Definition file.h:329
osl_File_Type_Volume
@ osl_File_Type_Volume
Definition file.h:330
osl_File_Type_Fifo
@ osl_File_Type_Fifo
Definition file.h:332
osl_File_Type_Special
@ osl_File_Type_Special
Definition file.h:335
osl_File_Type_Regular
@ osl_File_Type_Regular
Definition file.h:331
osl_File_Type_Socket
@ osl_File_Type_Socket
Definition file.h:333
osl_File_Type_Unknown
@ osl_File_Type_Unknown
Definition file.h:336
_oslFileStatus
Structure containing information about files and directories.
Definition file.h:382
_oslFileStatus::uValidFields
sal_uInt32 uValidFields
Determines which members of the structure contain valid data.
Definition file.h:386
_oslFileStatus::aAccessTime
TimeValue aAccessTime
Last access time in nanoseconds since 1/1/1970.
Definition file.h:396
_oslFileStatus::ustrLinkTargetURL
rtl_uString * ustrLinkTargetURL
Full URL of the target file if the file itself is a link.
Definition file.h:410
_oslFileStatus::uAttributes
sal_uInt64 uAttributes
File attributes.
Definition file.h:390
_oslFileStatus::ustrFileName
rtl_uString * ustrFileName
Case correct name of the file.
Definition file.h:403
_oslFileStatus::eType
oslFileType eType
The type of the file (file, directory, volume).
Definition file.h:388
_oslFileStatus::uFileSize
sal_uInt64 uFileSize
Size in bytes of the file.
Definition file.h:400
_oslFileStatus::uStructSize
sal_uInt32 uStructSize
Must be initialized with the size in bytes of the structure before passing it to any function.
Definition file.h:384
_oslFileStatus::aModifyTime
TimeValue aModifyTime
Last modify time in nanoseconds since 1/1/1970.
Definition file.h:398
_oslFileStatus::ustrFileURL
rtl_uString * ustrFileURL
Full URL of the file.
Definition file.h:406
_oslFileStatus::aCreationTime
TimeValue aCreationTime
First creation time in nanoseconds since 1/1/1970.
Definition file.h:393
_oslVolumeInfo
Structure containing information about volumes.
Definition file.h:564
_oslVolumeInfo::uMaxNameLength
sal_uInt32 uMaxNameLength
Maximum length of file name of a single item.
Definition file.h:579
_oslVolumeInfo::uValidFields
sal_uInt32 uValidFields
Determines which members of the structure contain valid data.
Definition file.h:569
_oslVolumeInfo::uMaxPathLength
sal_uInt32 uMaxPathLength
Maximum length of a full qualified path in system notation.
Definition file.h:581
_oslVolumeInfo::uAttributes
sal_uInt32 uAttributes
Attributes of the volume (remote and/or removable).
Definition file.h:571
_oslVolumeInfo::uUsedSpace
sal_uInt64 uUsedSpace
Used space on the volume for the current process/user.
Definition file.h:575
_oslVolumeInfo::pDeviceHandle
oslVolumeDeviceHandle * pDeviceHandle
Pointer to handle the receives underlying device.
Definition file.h:588
_oslVolumeInfo::uTotalSpace
sal_uInt64 uTotalSpace
Total available space on the volume for the current process/user.
Definition file.h:573
_oslVolumeInfo::ustrFileSystemName
rtl_uString * ustrFileSystemName
Points to a string that receives the name of the file system type.
Definition file.h:585
_oslVolumeInfo::uStructSize
sal_uInt32 uStructSize
Must be initialized with the size in bytes of the structure before passing it to any function.
Definition file.h:567
_oslVolumeInfo::uFreeSpace
sal_uInt64 uFreeSpace
Free space on the volume for the current process/user.
Definition file.h:577
TimeValue
Time since Jan-01-1970.
Definition time.h:76