20 #ifndef INCLUDED_OSL_FILE_H 21 #define INCLUDED_OSL_FILE_H 168 rtl_uString *pustrDirectoryURL, oslDirectory *pDirectory);
202 oslDirectory Directory,
203 oslDirectoryItem *pItem,
223 oslDirectory Directory);
262 rtl_uString *pustrFileURL,
263 oslDirectoryItem *pItem
284 oslDirectoryItem Item );
306 oslDirectoryItem Item );
328 oslDirectoryItem pItemA,
329 oslDirectoryItem pItemB );
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 360 #define osl_FileStatus_Mask_Type 0x00000001 361 #define osl_FileStatus_Mask_Attributes 0x00000002 362 #define osl_FileStatus_Mask_CreationTime 0x00000010 363 #define osl_FileStatus_Mask_AccessTime 0x00000020 364 #define osl_FileStatus_Mask_ModifyTime 0x00000040 365 #define osl_FileStatus_Mask_FileSize 0x00000080 366 #define osl_FileStatus_Mask_FileName 0x00000100 367 #define osl_FileStatus_Mask_FileURL 0x00000200 368 #define osl_FileStatus_Mask_LinkTargetURL 0x00000400 369 #define osl_FileStatus_Mask_All 0x7FFFFFFF 370 #define osl_FileStatus_Mask_Validate 0x80000000 452 oslDirectoryItem Item,
oslFileStatus *pStatus, sal_uInt32 uFieldMask );
476 oslVolumeDeviceHandle Handle );
497 oslVolumeDeviceHandle Handle );
526 oslVolumeDeviceHandle Handle, rtl_uString **ppustrDirectoryURL);
530 #define osl_Volume_Attribute_Removeable 0x00000001L 531 #define osl_Volume_Attribute_Remote 0x00000002L 532 #define osl_Volume_Attribute_CompactDisc 0x00000004L 533 #define osl_Volume_Attribute_FixedDisk 0x00000008L 534 #define osl_Volume_Attribute_RAMDisk 0x00000010L 535 #define osl_Volume_Attribute_FloppyDisk 0x00000020L 537 #define osl_Volume_Attribute_Case_Is_Preserved 0x00000040L 538 #define osl_Volume_Attribute_Case_Sensitive 0x00000080L 542 #define osl_VolumeInfo_Mask_Attributes 0x00000001L 543 #define osl_VolumeInfo_Mask_TotalSpace 0x00000002L 544 #define osl_VolumeInfo_Mask_UsedSpace 0x00000004L 545 #define osl_VolumeInfo_Mask_FreeSpace 0x00000008L 546 #define osl_VolumeInfo_Mask_MaxNameLength 0x00000010L 547 #define osl_VolumeInfo_Mask_MaxPathLength 0x00000020L 548 #define osl_VolumeInfo_Mask_FileSystemName 0x00000040L 549 #define osl_VolumeInfo_Mask_DeviceHandle 0x00000080L 550 #define osl_VolumeInfo_Mask_FileSystemCaseHandling 0x00000100L 621 rtl_uString *pustrDirectoryURL,
623 sal_uInt32 uFieldMask );
629 #define osl_File_OpenFlag_Read 0x00000001L 630 #define osl_File_OpenFlag_Write 0x00000002L 631 #define osl_File_OpenFlag_Create 0x00000004L 632 #define osl_File_OpenFlag_NoLock 0x00000008L 690 rtl_uString *pustrFileURL, oslFileHandle *pHandle, sal_uInt32 uFlags );
692 #define osl_Pos_Absolut 1 693 #define osl_Pos_Current 2 694 #define osl_Pos_End 3 738 oslFileHandle Handle, sal_uInt64 *pPos );
763 oslFileHandle Handle, sal_uInt64 uSize );
787 oslFileHandle Handle, sal_uInt64 *pSize );
794 #define osl_File_MapFlag_RandomAccess ((sal_uInt32)(0x1)) 802 #define osl_File_MapFlag_WillNeed ((sal_uInt32)(0x2)) 818 oslFileHandle Handle,
860 oslFileHandle Handle,
901 oslFileHandle Handle,
void *pBuffer, sal_uInt64 uBytesRequested, sal_uInt64 *pBytesRead );
929 oslFileHandle Handle,
sal_Bool *pIsEOF );
969 oslFileHandle Handle,
const void *pBuffer, sal_uInt64 uBytesToWrite, sal_uInt64 *pBytesWritten );
978 oslFileHandle Handle,
981 sal_uInt64 uBytesRequested,
982 sal_uInt64* pBytesRead
993 oslFileHandle Handle,
996 sal_uInt64 uBytesToWrite,
997 sal_uInt64* pBytesWritten
1115 rtl_uString * url, sal_uInt32 flags);
1205 rtl_uString* aDirectoryUrl,
1237 rtl_uString* pustrFileURL );
1268 rtl_uString* pustrSourceFileURL, rtl_uString *pustrDestFileURL );
1297 rtl_uString* pustrSourceFileURL, rtl_uString *pustrDestFileURL );
1321 rtl_uString *pustrRequestedURL, rtl_uString **ppustrValidURL);
1359 rtl_uString* pustrBaseDirectoryURL,
1360 rtl_uString *pustrRelativeFileURL,
1361 rtl_uString **ppustrAbsoluteFileURL );
1379 rtl_uString *pustrSystemPath, rtl_uString **ppustrFileURL);
1410 rtl_uString *pustrFileName, rtl_uString *pustrSearchPath, rtl_uString **ppustrFileURL );
1428 rtl_uString *pustrFileURL, rtl_uString **ppustrSystemPath);
1467 rtl_uString *ustrSystemPath,
1468 rtl_uString **pustrCompacted,
1469 sal_uInt32 uMaxWidth,
1488 rtl_uString *pustrFileURL, sal_uInt64
uAttributes );
1513 rtl_uString *pustrFileURL,
1529 rtl_uString **pustrTempDirURL );
1583 rtl_uString* pustrDirectoryURL,
1584 oslFileHandle* pHandle,
1585 rtl_uString** ppustrTempFileURL);
1591 #endif // INCLUDED_OSL_FILE_H SAL_DLLPUBLIC oslFileError osl_copyFile(rtl_uString *pustrSourceFileURL, rtl_uString *pustrDestFileURL)
Copy a file to a new destination.
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...
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.
sal_uInt64 uAttributes
File attributes.
Definition: file.h:389
SAL_DLLPUBLIC oslFileError osl_closeFile(oslFileHandle Handle)
Close an open file.
void * oslFileHandle
Definition: file.h:625
SAL_DLLPUBLIC oslFileError osl_releaseVolumeDeviceHandle(oslVolumeDeviceHandle Handle)
Release a volume device handle.
SAL_DLLPUBLIC oslFileError osl_createDirectory(rtl_uString *pustrDirectoryURL)
Create a directory.
oslFileType eType
The type of the file (file, directory, volume).
Definition: file.h:387
SAL_DLLPUBLIC oslFileError osl_openDirectory(rtl_uString *pustrDirectoryURL, oslDirectory *pDirectory)
Open a directory for enumerating its contents.
SAL_DLLPUBLIC oslFileError osl_setFileAttributes(rtl_uString *pustrFileURL, sal_uInt64 uAttributes)
Set file attributes.
sal_uInt32 uMaxPathLength
Maximum length of a full qualified path in system notation.
Definition: file.h:576
SAL_DLLPUBLIC oslFileError osl_getVolumeInformation(rtl_uString *pustrDirectoryURL, oslVolumeInfo *pInfo, sal_uInt32 uFieldMask)
Retrieve information about a volume.
SAL_DLLPUBLIC oslFileError osl_acquireVolumeDeviceHandle(oslVolumeDeviceHandle Handle)
Acquire a volume device handle.
SAL_DLLPUBLIC oslFileError osl_getSystemPathFromFileURL(rtl_uString *pustrFileURL, rtl_uString **ppustrSystemPath)
Convert a file URL into a system dependent path.
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
#define SAL_DLLPUBLIC
Definition: saldllapi.h:30
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.
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.
struct _oslFileStatus oslFileStatus
TimeValue aAccessTime
Last access time in nanoseconds since 1/1/1970.
Definition: file.h:395
SAL_DLLPUBLIC oslFileError osl_getFilePos(oslFileHandle Handle, sal_uInt64 *pPos)
Retrieve the current position of the internal pointer of an open file.
sal_uInt64 uFileSize
Size in bytes of the file.
Definition: file.h:399
void * oslDirectoryItem
Definition: file.h:140
sal_uInt64 uFreeSpace
Free space on the volume for the current process/user.
Definition: file.h:572
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
sal_uInt32 uStructSize
Must be initialized with the size in bytes of the structure before passing it to any function...
Definition: file.h:383
rtl_uString * ustrFileSystemName
Points to a string that receives the name of the file system type.
Definition: file.h:579
SAL_DLLPUBLIC oslFileError osl_setFileSize(oslFileHandle Handle, sal_uInt64 uSize)
Set the file size of an open file.
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:1160
SAL_DLLPUBLIC oslFileError osl_getFileStatus(oslDirectoryItem Item, oslFileStatus *pStatus, sal_uInt32 uFieldMask)
Retrieve information about a single file or directory.
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_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.
unsigned char sal_Bool
Definition: types.h:39
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
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.
SAL_DLLPUBLIC oslFileError osl_getTempDirURL(rtl_uString **pustrTempDirURL)
Retrieves the file URL of the system'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.
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.
SAL_DLLPUBLIC oslFileError osl_getNextDirectoryItem(oslDirectory Directory, oslDirectoryItem *pItem, sal_uInt32 uHint)
Retrieve the next item of a previously opened directory.
SAL_DLLPUBLIC oslFileError osl_abbreviateSystemPath(rtl_uString *ustrSystemPath, rtl_uString **pustrCompacted, sal_uInt32 uMaxWidth, oslCalcTextWidthFunc pCalcWidth)
Abbreviate a system notation path.
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
sal_uInt32 uAttributes
Attributes of the volume (remote and/or removable)
Definition: file.h:566
rtl_uString * ustrFileName
Case correct name of the file.
Definition: file.h:402
TimeValue aModifyTime
Last modify time in nanoseconds since 1/1/1970.
Definition: file.h:397
oslFileError
Definition: file.h:87
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_syncFile(oslFileHandle Handle)
Synchronize the memory representation of a file with that on the physical medium. ...
SAL_DLLPUBLIC oslFileError osl_searchFileURL(rtl_uString *pustrFileName, rtl_uString *pustrSearchPath, rtl_uString **ppustrFileURL)
Searche a full qualified system path or a file URL.
SAL_DLLPUBLIC oslFileError osl_unmapMappedFile(oslFileHandle Handle, void *pAddr, sal_uInt64 uLength)
Unmap a file segment from memory.
This is the binary specification of a SAL sequence.
Definition: types.h:327
#define SAL_WARN_UNUSED_RESULT
Use this as markup for functions and methods whose return value must be checked.
Definition: types.h:307
sal_uInt32 uMaxNameLength
Maximum length of file name of a single item.
Definition: file.h:574
oslFileType
Definition: file.h:333
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.
rtl_uString * ustrFileURL
Full URL of the file.
Definition: file.h:405
void * oslDirectory
Definition: file.h:139
#define SAL_MAX_ENUM
Definition: types.h:228
sal_uInt32(* oslCalcTextWidthFunc)(rtl_uString *ustrText)
Function pointer representing the function called back from osl_abbreviateSystemPath.
Definition: file.h:1443
sal_uInt32 uValidFields
Determines which members of the structure contain valid data.
Definition: file.h:385
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.
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.
Structure containing information about volumes.
Definition: file.h:560
SAL_DLLPUBLIC oslFileError osl_openFile(rtl_uString *pustrFileURL, oslFileHandle *pHandle, sal_uInt32 uFlags)
Open a regular file.
sal_uInt64 uTotalSpace
Total available space on the volume for the current process/user.
Definition: file.h:568
sal_uInt32 uStructSize
Must be initialized with the size in bytes of the structure before passing it to any function...
Definition: file.h:562
SAL_DLLPUBLIC oslFileError osl_unmapFile(void *pAddr, sal_uInt64 uLength)
Unmap a shared file from memory.
SAL_DLLPUBLIC oslFileError osl_isEndOfFile(oslFileHandle Handle, sal_Bool *pIsEOF)
Test if the end of a file is reached.