Overview | Namespace | Class | Index | Help |
Global Functions in Global Namespace C++
in Sourcefile file.h
- osl_abbreviateSystemPath
- extern "C"
oslFileError osl_abbreviateSystemPath( rtl_uString * ustrSystemPath, rtl_uString * * pustrCompacted, sal_uInt32 uMaxWidth, oslCalcTextWidthFunc pCalcWidth );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Abbreviate a system notation path.
- Parameters
ustrSystemPath The full system path to abbreviate
pustrCompacted Receives the compacted system path on output
pfnCalcWidth Function ptr that calculates the width of a string. Can be zero.
uMaxWidth Maximum width allowed that is retunrned from pfnCalcWidth. If pfnCalcWidth is zero the character count is assumed as width.
- Return
-
osl_File_E_None on success
- See Also
- oslCalcTextWidthFunc
- osl_acquireDirectoryItem
- extern "C"
oslFileError osl_acquireDirectoryItem( oslDirectoryItem Item );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Increase the refcount of a directory item handle.
- Description
- The caller responsible for releasing the directory item handle using osl_releaseDirectoryItem().
- Parameters
Item A handle received by a call to osl_getDirectoryItem() or osl_getNextDirectoryItem().
- Return
-
osl_File_E_None on success
osl_File_E_NOMEM not enough memory for allocating structures
osl_File_E_INVAL the format of the parameters was not valid
- See Also
- osl_getDirectoryItem()
osl_getNextDirectoryItem()
osl_releaseDirectoryItem()
- osl_acquireVolumeDeviceHandle
- extern "C"
oslFileError osl_acquireVolumeDeviceHandle( oslVolumeDeviceHandle Handle );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Acquire a volume device handle.
- Description
- Acquires the given oslVolumeDeviceHandle which was acquired by a call to osl_getVolumeInformation(). The caller is responsible for releasing the acquired handle by calling osl_releaseVolumeDeviceHandle().
- Parameters
Handle An oslVolumeDeviceHandle received by a call to osl_getVolumeInformation().
- Return
-
osl_File_E_None on success
- Todos
- specify all error codes that may be returned
- See Also
- osl_getVolumeInformation()
- osl_automountVolumeDevice
- extern "C"
oslFileError osl_automountVolumeDevice( oslVolumeDeviceHandle Handle );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Automount a volume device.
- Description
- Automount the volume device specified by the given oslVolumeDeviceHandle.
- Parameters
Handle An oslVolumeDeviceHandle received by a call to osl_getVolumeInformation().
- Return
-
osl_File_E_None on success
- Todos
- specify all error codes that may be returned
- See Also
- osl_getVolumeInformation()
- osl_closeDirectory
- extern "C"
oslFileError osl_closeDirectory( oslDirectory Directory );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Release a directory handle.
- Parameters
Directory A handle received by a call to osl_openDirectory().
- Return
-
osl_File_E_None on success
osl_File_E_INVAL the format of the parameters was not valid
osl_File_E_NOMEM not enough memory for allocating structures
osl_File_E_BADF invalid oslDirectory parameter
osl_File_E_INTR the function call was interrupted - See Also
- osl_openDirectory()
- osl_closeFile
- extern "C"
oslFileError osl_closeFile( oslFileHandle Handle );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Close an open file.
- Parameters
Handle Handle to a file received by a previous call to osl_openFile().
- Return
-
osl_File_E_None on success
osl_File_E_INVAL the format of the parameters was not valid
osl_File_E_BADF Bad file
osl_File_E_INTR function call was interrupted
osl_File_E_NOLINK link has been severed
osl_File_E_NOSPC no space left on device
osl_File_E_IO on I/O errors
- See Also
- osl_openFile()
- osl_copyFile
- extern "C"
oslFileError osl_copyFile( rtl_uString * pustrSourceFileURL, rtl_uString * pustrDestFileURL );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Copy a file to a new destination.
- Description
- Copies a file to a new destination. Copies only files not directories. No assumptions should be made about preserving attributes or file time.
- Parameters
pustrSourceFileURL Full qualified URL of the source file.
pustrDestFileURL Full qualified URL of the destination file. A directory is NOT a valid destination file!
- Return
-
osl_File_E_None on success
osl_File_E_INVAL the format of the parameters was not valid
osl_File_E_NOMEM not enough memory for allocating structures
osl_File_E_ACCES permission denied
osl_File_E_PERM operation not permitted
osl_File_E_NAMETOOLONG file name too long
osl_File_E_NOENT no such file or directory
osl_File_E_ISDIR is a directory
osl_File_E_ROFS read-only file system - See Also
- osl_moveFile()
osl_removeFile()
- osl_createDirectory
- extern "C"
oslFileError osl_createDirectory( rtl_uString * pustrDirectoryURL );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Create a directory.
- Parameters
pustrDirectoryURL Full qualified URL of the directory to create.
- Return
-
osl_File_E_None on success
osl_File_E_INVAL the format of the parameters was not valid
osl_File_E_NOMEM not enough memory for allocating structures
osl_File_E_EXIST file exists
osl_File_E_ACCES permission denied
osl_File_E_NAMETOOLONG file name too long
osl_File_E_NOENT no such file or directory
osl_File_E_NOTDIR not a directory
osl_File_E_ROFS read-only file system
osl_File_E_NOSPC no space left on device
osl_File_E_DQUOT quota exceeded
osl_File_E_LOOP too many symbolic links encountered
osl_File_E_FAULT bad address
osl_FileE_IO on I/O errors
osl_File_E_MLINK too many links
osl_File_E_MULTIHOP multihop attempted
osl_File_E_NOLINK link has been severed
- See Also
- osl_removeDirectory()
- osl_createDirectoryPath
- extern "C"
oslFileError osl_createDirectoryPath( rtl_uString * aDirectoryUrl, oslDirectoryCreationCallbackFunc aDirectoryCreationCallbackFunc, void * pData );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Create a directory path.
- Description
- The osl_createDirectoryPath function creates a specified directory path.
All nonexisting sub directories will be created.
PLEASE NOTE: You cannot rely on getting the error code osl_File_E_EXIST for existing directories. Programming against this error code is in general a strong indication of a wrong usage of osl_createDirectoryPath.
- Parameters
aDirectoryUrl [in] The absolute file URL of the directory path to create. A relative file URL will not be accepted.
aDirectoryCreationFunc [in] Pointer to a function that will be called synchronously for each sub directory that was created. The value of this parameter may be NULL, in this case notifications will not be sent.
pData [in] User specified data to be passed to the directory creation callback function. The value of this parameter may be arbitrary and will not be interpreted by osl_createDirectoryPath.
- Return
-
- osl_File_E_None
- On success
- osl_File_E_INVAL
- The format of the parameters was not valid
- osl_File_E_ACCES
- Permission denied
- osl_File_E_EXIST
- The final node of the specified directory path already exist
- osl_File_E_NAMETOOLONG
- The name of the specified directory path exceeds the maximum allowed length
- osl_File_E_NOTDIR
- A component of the specified directory path already exist as file in any part of the directory path
- osl_File_E_ROFS
- Read-only file system
- osl_File_E_NOSPC
- No space left on device
- osl_File_E_DQUOT
- Quota exceeded
- osl_File_E_FAULT
- Bad address
- osl_File_E_IO
- I/O error
- osl_File_E_LOOP
- Too many symbolic links encountered
- osl_File_E_NOLINK
- Link has been severed
- osl_File_E_invalidError
- An unknown error occurred
- See Also
- oslDirectoryCreationFunc
oslFileError
osl_createDirectory
- osl_createTempFile
- extern "C"
oslFileError osl_createTempFile( rtl_uString * pustrDirectoryURL, oslFileHandle * pHandle, rtl_uString * * ppustrTempFileURL );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Creates a temporary file in the directory provided by the caller or the directory returned by osl_getTempDirURL.
- Description
- Creates a temporary file in the directory provided by the caller or the directory returned by osl_getTempDirURL. Under UNIX Operating Systems the file will be created with read and write access for the user exclusively. If the caller requests only a handle to the open file but not the name of it, the file will be automatically removed on close else the caller is responsible for removing the file on success.
- Parameters
pustrDirectoryURL Specifies the full qualified URL where the temporary file should be created. If pustrDirectoryURL is 0 the path returned by osl_getTempDirURL will be used.
pHandle On success receives a handle to the open file. If pHandle is 0 the file will be closed on return, in this case ppustrTempFileURL must not be 0.
ppustrTempFileURL On success receives the full qualified URL of the temporary file. If ppustrTempFileURL is 0 the file will be automatically removed on close, in this case pHandle must not be 0. If ppustrTempFileURL is not 0 the caller receives the name of the created file and is responsible for removing the file, in this case *ppustrTempFileURL must be 0 or must point to a valid rtl_uString.
- Return
- osl_File_E_None on success osl_File_E_INVAL the format of the parameter is invalid osl_File_E_NOMEM not enough memory for allocating structures osl_File_E_ACCES Permission denied osl_File_E_NOENT No such file or directory osl_File_E_NOTDIR Not a directory osl_File_E_ROFS Read-only file system osl_File_E_NOSPC No space left on device osl_File_E_DQUOT Quota exceeded
- See Also
- osl_getTempDirURL()
- osl_getAbsoluteFileURL
- extern "C"
oslFileError osl_getAbsoluteFileURL( rtl_uString * pustrBaseDirectoryURL, rtl_uString * pustrRelativeFileURL, rtl_uString * * ppustrAbsoluteFileURL );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Convert a path relative to a given directory into an full qualified file URL.
- Description
- Convert a path relative to a given directory into an full qualified file URL. The function resolves symbolic links if possible and path ellipses, so on success the resulting absolute path is fully resolved.
- Parameters
pustrBaseDirectoryURL Base directory URL to which the relative path is related to.
pustrRelativeFileURL An URL of a file or directory relative to the directory path specified by pustrBaseDirectoryURL or an absolute path. If pustrRelativeFileURL denotes an absolute path pustrBaseDirectoryURL will be ignored.
ppustrAbsoluteFileURL On success it receives the full qualified absoulte file URL.
- Return
-
osl_File_E_None on success
osl_File_E_INVAL the format of the parameters was not valid
osl_File_E_NOMEM not enough memory for allocating structures
osl_File_E_NOTDIR not a directory
osl_File_E_ACCES permission denied
osl_File_E_NOENT no such file or directory
osl_File_E_NAMETOOLONG file name too long
osl_File_E_OVERFLOW value too large for defined data type
osl_File_E_FAULT bad address
osl_File_E_INTR function call was interrupted
osl_File_E_LOOP too many symbolic links encountered
osl_File_E_MULTIHOP multihop attempted
osl_File_E_NOLINK link has been severed
- See Also
- osl_getFileStatus()
- osl_getCanonicalName
- extern "C"
oslFileError osl_getCanonicalName( rtl_uString * pustrRequestedURL, rtl_uString * * ppustrValidURL );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Determine a valid unused canonical name for a requested name.
- Description
- Determines a valid unused canonical name for a requested name. Depending on the Operating System and the File System the illegal characters are replaced by valid ones. If a file or directory with the requested name already exists a new name is generated following the common rules on the actual Operating System and File System.
- Parameters
pustrRequestedURL Requested name of a file or directory.
ppustrValidURL On success receives a name which is unused and valid on the actual Operating System and File System.
- Return
-
osl_File_E_None on success
osl_File_E_INVAL the format of the parameters was not valid
- See Also
- osl_getFileStatus()
- osl_getDirectoryItem
- extern "C"
oslFileError osl_getDirectoryItem( rtl_uString * pustrFileURL, oslDirectoryItem * pItem );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Retrieve a single directory item.
- Description
- Retrieves a single directory item. The returned handle has an initial refcount of 1. Due to performance issues it is not recommended to use this function while enumerating the contents of a directory. In this case use osl_getNextDirectoryItem() instead.
- Parameters
pustrFileURL An absolute file URL.
pItem On success it receives a handle which can be used for subsequent calls to osl_getFileStatus(). The handle has to be released by a call to osl_releaseDirectoryItem().
- Return
-
osl_File_E_None on success
osl_File_E_INVAL the format of the parameters was not valid
osl_File_E_NOMEM not enough memory for allocating structures
osl_File_E_ACCES permission denied
osl_File_E_MFILE too many open files used by the process
osl_File_E_NFILE too many open files in the system
osl_File_E_NOENT no such file or directory
osl_File_E_LOOP too many symbolic links encountered
osl_File_E_NAMETOOLONG the file name is too long
osl_File_E_NOTDIR a component of the path prefix of path is not a directory
osl_File_E_IO on I/O errors
osl_File_E_MULTIHOP multihop attempted
osl_File_E_NOLINK link has been severed
osl_File_E_FAULT bad address
osl_File_E_INTR the function call was interrupted - See Also
- osl_releaseDirectoryItem()
osl_acquireDirectoryItem()
osl_getFileStatus()
osl_getNextDirectoryItem()
- osl_getFilePos
- extern "C"
oslFileError osl_getFilePos( oslFileHandle Handle, sal_uInt64 * pPos );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Retrieve the current position of the internal pointer of an open file.
- Parameters
Handle Handle to a file received by a previous call to osl_openFile().
pPos On success receives the current position of the file pointer.
- Return
-
osl_File_E_None on success
osl_File_E_INVAL the format of the parameters was not valid
osl_File_E_OVERFLOW the resulting file offset would be a value which cannot be represented correctly for regular files
- See Also
- osl_openFile()
osl_setFilePos()
osl_readFile()
osl_writeFile()
- osl_getFileSize
- extern "C"
oslFileError osl_getFileSize( oslFileHandle Handle, sal_uInt64 * pSize );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Get the file size of an open file.
- Description
- Gets the file size of an open file. The position of the file pointer is not affeced by this function.
- Parameters
Handle Handle to a file received by a previous call to osl_openFile().
pSize Current size in bytes.
- Return
-
osl_File_E_None on success
osl_File_E_INVAL the format of the parameters was not valid
osl_File_E_OVERFLOW the resulting file offset would be a value which cannot be represented correctly for regular files
- See Also
- osl_openFile()
osl_setFilePos()
osl_getFileStatus()
- osl_getFileStatus
- extern "C"
oslFileError osl_getFileStatus( oslDirectoryItem Item, oslFileStatus * pStatus, sal_uInt32 uFieldMask );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Retrieve information about a single file or directory.
- Parameters
Item A handle received by a previous call to osl_getDirectoryItem() or osl_getNextDirectoryItem().
pStatus Points to a structure which receives the information of the file or directory represented by the handle Item. The member uStructSize has to be initialized to sizeof(oslFileStatus) before calling this function.
uFieldMask Specifies which fields of the structure pointed to by pStatus are of interest to the caller.
- Return
-
osl_File_E_None on success
osl_File_E_NOMEM not enough memory for allocating structures
osl_File_E_INVAL the format of the parameters was not valid
osl_File_E_LOOP too many symbolic links encountered
osl_File_E_ACCES permission denied
osl_File_E_NOENT no such file or directory
osl_File_E_NAMETOOLONG file name too long
osl_File_E_BADF invalid oslDirectoryItem parameter
osl_File_E_FAULT bad address
osl_File_E_OVERFLOW value too large for defined data type
osl_File_E_INTR function call was interrupted
osl_File_E_NOLINK link has been severed
osl_File_E_MULTIHOP components of path require hopping to multiple remote machines and the file system does not allow it
osl_File_E_MFILE too many open files used by the process
osl_File_E_NFILE too many open files in the system
osl_File_E_NOSPC no space left on device
osl_File_E_NXIO no such device or address
osl_File_E_IO on I/O errors
osl_File_E_NOSYS function not implemented - See Also
- osl_getDirectoryItem()
osl_getNextDirectoryItem()
oslFileStatus
- osl_getFileURLFromSystemPath
- extern "C"
oslFileError osl_getFileURLFromSystemPath( rtl_uString * pustrSystemPath, rtl_uString * * ppustrFileURL );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Convert a system dependend path into a file URL.
- Parameters
pustrSystemPath A System dependent path of a file or directory.
ppustrFileURL On success it receives the file URL.
- Return
-
osl_File_E_None on success
osl_File_E_INVAL the format of the parameters was not valid
- See Also
- osl_getSystemPathFromFileURL()
- osl_getNextDirectoryItem
- extern "C"
oslFileError osl_getNextDirectoryItem( oslDirectory Directory, oslDirectoryItem * pItem, sal_uInt32 uHint );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Retrieve the next item of a previously opened directory.
- Description
- Retrieves the next item of a previously opened directory. All handles have an initial refcount of 1.
- Parameters
Directory A directory handle received from a previous call to osl_openDirectory().
pItem On success it receives a handle that can be used for subsequent calls to osl_getFileStatus(). The handle has to be released by a call to osl_releaseDirectoryItem().
uHint With this parameter the caller can tell the implementation that (s)he is going to call this function uHint times afterwards. This enables the implementation to get the information for more than one file and cache it until the next calls.
- Return
-
osl_File_E_None on success
osl_File_E_INVAL the format of the parameters was not valid
osl_File_E_NOMEM not enough memory for allocating structures
osl_File_E_NOENT no more entries in this directory
osl_File_E_BADF invalid oslDirectory parameter
osl_File_E_OVERFLOW the value too large for defined data type - See Also
- osl_releaseDirectoryItem()
osl_acquireDirectoryItem()
osl_getDirectoryItem()
osl_getFileStatus()
- osl_getSystemPathFromFileURL
- extern "C"
oslFileError osl_getSystemPathFromFileURL( rtl_uString * pustrFileURL, rtl_uString * * ppustrSystemPath );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Convert a file URL into a system dependend path.
- Parameters
pustrFileURL A File URL.
ppustrSystemPath On success it receives the system path.
- Return
- osl_File_E_None on success osl_File_E_INVAL the format of the parameters was not valid
- See Also
- osl_getFileURLFromSystemPath()
- osl_getTempDirURL
- extern "C"
oslFileError osl_getTempDirURL( rtl_uString * * pustrTempDirURL );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Retrieves the file URL of the system's temporary directory path
- Parameters
pustrTempDirURL[out] On success receives the URL of system's temporary directory path.
- Return
- osl_File_E_None on success osl_File_E_NOENT no such file or directory not found
- osl_getVolumeDeviceMountPath
- extern "C"
oslFileError osl_getVolumeDeviceMountPath( oslVolumeDeviceHandle Handle, rtl_uString * * ppustrDirectoryURL );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Get the full qualified URL where a device is mounted to.
- Parameters
Handle An oslVolumeDeviceHandle received by a call to osl_getVolumeInformation().
ppustrDirectoryURL Receives the full qualified URL where the device is mounted to.
- Return
-
osl_File_E_None on success
osl_File_E_NOMEM not enough memory for allocating structures
osl_File_E_INVAL the format of the parameters was not valid
osl_File_E_ACCES permission denied
osl_File_E_NXIO no such device or address
osl_File_E_NODEV no such device
osl_File_E_NOENT no such file or directory
osl_File_E_FAULT bad address
osl_FilE_E_INTR function call was interrupted
osl_File_E_IO on I/O errors
osl_File_E_MULTIHOP multihop attempted
osl_File_E_NOLINK link has been severed
osl_File_E_EOVERFLOW value too large for defined data type
- See Also
- osl_getVolumeInformation()
osl_automountVolumeDevice()
osl_unmountVolumeDevice()
- osl_getVolumeInformation
- extern "C"
oslFileError osl_getVolumeInformation( rtl_uString * pustrDirectoryURL, oslVolumeInfo * pInfo, sal_uInt32 uFieldMask );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Retrieve information about a volume.
- Description
- Retrieves information about a volume. A volume can either be a mount point, a network resource or a drive depending on Operating System and File System. Before calling this function osl_getFileStatus() should be called to determine if the type is osl_file_Type_Volume.
- Parameters
pustrDirectoryURL Full qualified URL of the volume
pInfo On success it receives information about the volume.
uFieldMask Specifies which members of the structure should be filled
- Return
-
osl_File_E_None on success
osl_File_E_NOMEM not enough memory for allocating structures
osl_File_E_INVAL the format of the parameters was not valid
osl_File_E_NOTDIR not a directory
osl_File_E_NAMETOOLONG file name too long
osl_File_E_NOENT no such file or directory
osl_File_E_ACCES permission denied
osl_File_E_LOOP too many symbolic links encountered
ols_File_E_FAULT Bad address
osl_File_E_IO on I/O errors
osl_File_E_NOSYS function not implemented
osl_File_E_MULTIHOP multihop attempted
osl_File_E_NOLINK link has been severed
osl_File_E_INTR function call was interrupted
- See Also
- osl_getFileStatus()
oslVolumeInfo
- osl_isEndOfFile
- extern "C"
oslFileError osl_isEndOfFile( oslFileHandle Handle, sal_Bool * pIsEOF );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Test if the end of a file is reached.
- Parameters
Handle Handle to a file received by a previous call to osl_openFile().
pIsEOF Points to a variable that receives the end-of-file status.
- Return
-
osl_File_E_None on success
osl_File_E_INVAL the format of the parameters was not valid
osl_File_E_INTR function call was interrupted
osl_File_E_IO on I/O errors
osl_File_E_ISDIR is a directory
osl_File_E_BADF bad file
osl_File_E_FAULT bad address
osl_File_E_AGAIN operation would block
osl_File_E_NOLINK link has been severed - See Also
- osl_openFile()
osl_readFile()
osl_readLine()
osl_setFilePos()
- osl_mapFile
- extern "C"
oslFileError osl_mapFile( oslFileHandle Handle, void * * ppAddr, sal_uInt64 uLength, sal_uInt64 uOffset, sal_uInt32 uFlags );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Map a shared file into memory.
- Since
- UDK 3.2.10
- osl_moveFile
- extern "C"
oslFileError osl_moveFile( rtl_uString * pustrSourceFileURL, rtl_uString * pustrDestFileURL );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Move a file or directory to a new destination or renames it.
- Description
- Moves a file or directory to a new destination or renames it. File time and attributes are preserved.
- Parameters
pustrSourceFileURL Full qualified URL of the source file.
pustrDestFileURL Full qualified URL of the destination file. An existing directory is NOT a valid destination !
- Return
-
osl_File_E_None on success
osl_File_E_INVAL the format of the parameters was not valid
osl_File_E_NOMEM not enough memory for allocating structures
osl_File_E_ACCES permission denied
osl_File_E_PERM operation not permitted
osl_File_E_NAMETOOLONG file name too long
osl_File_E_NOENT no such file or directory
osl_File_E_ROFS read-only file system
- See Also
- osl_copyFile()
- osl_openDirectory
- extern "C"
oslFileError osl_openDirectory( rtl_uString * pustrDirectoryURL, oslDirectory * pDirectory );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Open a directory for enumerating its contents.
- Parameters
pustrDirectoryURL The full qualified URL of the directory.
pDirectory On success it receives a handle used for subsequent calls by osl_getNextDirectoryItem(). The handle has to be released by a call to osl_closeDirectory().
- Return
-
osl_File_E_None on success
osl_File_E_INVAL the format of the parameters was not valid
osl_File_E_NOENT the specified path doesn't exist
osl_File_E_NOTDIR the specified path is not an directory
osl_File_E_NOMEM not enough memory for allocating structures
osl_File_E_ACCES permission denied
osl_File_E_MFILE too many open files used by the process
osl_File_E_NFILE too many open files in the system
osl_File_E_NAMETOOLONG File name too long
osl_File_E_LOOP Too many symbolic links encountered - See Also
- osl_getNextDirectoryItem()
osl_closeDirectory()
- osl_openFile
- extern "C"
oslFileError osl_openFile( rtl_uString * pustrFileURL, oslFileHandle * pHandle, sal_uInt32 uFlags );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Open a regular file.
- Description
- Open a file. Only regular files can be openend.
- Parameters
pustrFileURL The full qualified URL of the file to open.
pHandle On success it receives a handle to the open file.
uFlags Specifies the open mode.
- Return
-
osl_File_E_None on success
osl_File_E_NOMEM not enough memory for allocating structures
osl_File_E_INVAL the format of the parameters was not valid
osl_File_E_NAMETOOLONG pathname was too long
osl_File_E_NOENT no such file or directory
osl_File_E_ACCES permission denied
osl_File_E_AGAIN a write lock could not be established
osl_File_E_NOTDIR not a directory
osl_File_E_NXIO no such device or address
osl_File_E_NODEV no such device
osl_File_E_ROFS read-only file system
osl_File_E_TXTBSY text file busy
osl_File_E_FAULT bad address
osl_File_E_LOOP too many symbolic links encountered
osl_File_E_NOSPC no space left on device
osl_File_E_ISDIR is a directory
osl_File_E_MFILE too many open files used by the process
osl_File_E_NFILE too many open files in the system
osl_File_E_DQUOT quota exceeded
osl_File_E_EXIST file exists
osl_FilE_E_INTR function call was interrupted
osl_File_E_IO on I/O errors
osl_File_E_MULTIHOP multihop attempted
osl_File_E_NOLINK link has been severed
osl_File_E_EOVERFLOW value too large for defined data type
- See Also
- osl_closeFile()
osl_setFilePos()
osl_getFilePos()
osl_readFile()
osl_writeFile()
osl_setFileSize()
osl_getFileSize()
- osl_readFile
- extern "C"
oslFileError osl_readFile( oslFileHandle Handle, void * pBuffer, sal_uInt64 uBytesRequested, sal_uInt64 * pBytesRead );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Read a number of bytes from a file.
- Description
- Reads a number of bytes from a file. The internal file pointer is increased by the number of bytes read.
- Parameters
Handle Handle to a file received by a previous call to osl_openFile().
pBuffer Points to a buffer which receives data. The buffer must be large enough to hold uBytesRequested bytes.
uBytesRequested Number of bytes which should be retrieved.
pBytesRead On success the number of bytes which have actually been retrieved.
- Return
-
osl_File_E_None on success
osl_File_E_INVAL the format of the parameters was not valid
osl_File_E_INTR function call was interrupted
osl_File_E_IO on I/O errors
osl_File_E_ISDIR is a directory
osl_File_E_BADF bad file
osl_File_E_FAULT bad address
osl_File_E_AGAIN operation would block
osl_File_E_NOLINK link has been severed
- See Also
- osl_openFile()
osl_writeFile()
osl_readLine()
osl_setFilePos()
- osl_readFileAt
- extern "C"
oslFileError osl_readFileAt( oslFileHandle Handle, sal_uInt64 uOffset, void * pBuffer, sal_uInt64 uBytesRequested, sal_uInt64 * pBytesRead );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Read a number of bytes from a specified offset in a file.
- Description
- The current position of the internal file pointer may or may not be changed.
- Since
- UDK 3.2.10
- osl_readLine
- extern "C"
oslFileError osl_readLine( oslFileHandle Handle, sal_Sequence * * ppSequence );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Read a line from a file.
- Description
- Reads a line from a file. The new line delimiter is NOT returned!
- Parameters
Handle Handle to a file received by a previous call to osl_openFile().
ppSequence A pointer pointer to a sal_Sequence that will hold the line read on success.
- Return
-
osl_File_E_None on success
osl_File_E_INVAL the format of the parameters was not valid
osl_File_E_INTR function call was interrupted
osl_File_E_IO on I/O errors
osl_File_E_ISDIR is a directory
osl_File_E_BADF bad file
osl_File_E_FAULT bad address
osl_File_E_AGAIN operation would block
osl_File_E_NOLINK link has been severed - See Also
- osl_openFile()
osl_readFile()
osl_writeFile()
osl_setFilePos()
- osl_releaseDirectoryItem
- extern "C"
oslFileError osl_releaseDirectoryItem( oslDirectoryItem Item );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Decrease the refcount of a directory item handle.
- Description
- Decreases the refcount of a directory item handle. If the refcount reaches 0 the data associated with this directory item handle will be released.
- Parameters
Item A handle received by a call to osl_getDirectoryItem() or osl_getNextDirectoryItem().
- Return
-
osl_File_E_None on success
osl_File_E_NOMEM not enough memory for allocating structures
osl_File_E_INVAL the format of the parameters was not valid
- See Also
- osl_getDirectoryItem()
osl_getNextDirectoryItem()
osl_acquireDirectoryItem()
- osl_releaseVolumeDeviceHandle
- extern "C"
oslFileError osl_releaseVolumeDeviceHandle( oslVolumeDeviceHandle Handle );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Release a volume device handle.
- Description
- Releases the given oslVolumeDeviceHandle which was acquired by a call to osl_getVolumeInformation() or osl_acquireVolumeDeviceHandle().
- Parameters
Handle An oslVolumeDeviceHandle received by a call to osl_getVolumeInformation().
- Return
-
osl_File_E_None on success
- Todos
- specify all error codes that may be returned
- See Also
- osl_acquireVolumeDeviceHandle()
osl_getVolumeInformation()
- osl_removeDirectory
- extern "C"
oslFileError osl_removeDirectory( rtl_uString * pustrDirectoryURL );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Remove an empty directory.
- Parameters
pustrDirectoryURL Full qualified URL of the directory.
- Return
-
osl_File_E_None on success
osl_File_E_INVAL the format of the parameters was not valid
osl_File_E_NOMEM not enough memory for allocating structures
osl_File_E_PERM operation not permitted
osl_File_E_ACCES permission denied
osl_File_E_NOENT no such file or directory
osl_File_E_NOTDIR not a directory
osl_File_E_NOTEMPTY directory not empty
osl_File_E_FAULT bad address
osl_File_E_NAMETOOLONG file name too long
osl_File_E_BUSY device or resource busy
osl_File_E_ROFS read-only file system
osl_File_E_LOOP too many symbolic links encountered
osl_File_E_BUSY device or resource busy
osl_File_E_EXIST file exists
osl_File_E_IO on I/O errors
osl_File_E_MULTIHOP multihop attempted
osl_File_E_NOLINK link has been severed
- See Also
- osl_createDirectory()
- osl_removeFile
- extern "C"
oslFileError osl_removeFile( rtl_uString * pustrFileURL );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Remove a regular file.
- Parameters
pustrFileURL Full qualified URL of the file to remove.
- Return
-
osl_File_E_None on success
osl_File_E_INVAL the format of the parameters was not valid
osl_File_E_NOMEM not enough memory for allocating structures
osl_File_E_ACCES permission denied
osl_File_E_PERM operation not permitted
osl_File_E_NAMETOOLONG file name too long
osl_File_E_NOENT no such file or directory
osl_File_E_ISDIR is a directory
osl_File_E_ROFS read-only file system
osl_File_E_FAULT bad address
osl_File_E_LOOP too many symbolic links encountered
osl_File_E_IO on I/O errors
osl_File_E_BUSY device or resource busy
osl_File_E_INTR function call was interrupted
osl_File_E_LOOP too many symbolic links encountered
osl_File_E_MULTIHOP multihop attempted
osl_File_E_NOLINK link has been severed
osl_File_E_TXTBSY text file busy
- See Also
- osl_openFile()
- osl_searchFileURL
- extern "C"
oslFileError osl_searchFileURL( rtl_uString * pustrFileName, rtl_uString * pustrSearchPath, rtl_uString * * ppustrFileURL );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Searche a full qualified system path or a file URL.
- Parameters
pustrFileName A system dependent path, a file URL, a file or relative directory.
pustrSearchPath A list of system paths, in which a given file has to be searched. The Notation of a path list is system dependend, e.g. on UNIX system "/usr/bin:/bin" and on Windows "C:\BIN;C:\BATCH". These paths are only for the search of a file or a relative path, otherwise it will be ignored. If pustrSearchPath is NULL or while using the search path the search failed, the function searches for a matching file in all system directories and in the directories listed in the PATH environment variable. The value of an environment variable should be used (e.g. LD_LIBRARY_PATH) if the caller is not aware of the Operating System and so doesn't know which path list delimiter to use.
ppustrFileURL On success it receives the full qualified file URL.
- Return
-
osl_File_E_None on success
osl_File_E_INVAL the format of the parameters was not valid
osl_File_E_NOTDIR not a directory
osl_File_E_NOENT no such file or directory not found
- See Also
- osl_getFileURLFromSystemPath()
osl_getSystemPathFromFileURL()
- osl_setFileAttributes
- extern "C"
oslFileError osl_setFileAttributes( rtl_uString * pustrFileURL, sal_uInt64 uAttributes );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Set file attributes.
- Parameters
pustrFileURL The full qualified file URL.
uAttributes Attributes of the file to be set.
- Return
-
osl_File_E_None on success
osl_File_E_INVAL the format of the parameters was not valid
- See Also
- osl_getFileStatus()
- osl_setFilePos
- extern "C"
oslFileError osl_setFilePos( oslFileHandle Handle, sal_uInt32 uHow, sal_Int64 uPos );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Set the internal position pointer of an open file.
- Parameters
Handle Handle to a file received by a previous call to osl_openFile().
uHow Distance to move the internal position pointer (from uPos).
uPos Absolute position from the beginning of the file.
- Return
-
osl_File_E_None on success
osl_File_E_INVAL the format of the parameters was not valid
osl_File_E_OVERFLOW the resulting file offset would be a value which cannot be represented correctly for regular files
- See Also
- osl_openFile()
osl_getFilePos()
- osl_setFileSize
- extern "C"
oslFileError osl_setFileSize( oslFileHandle Handle, sal_uInt64 uSize );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Set the file size of an open file.
- Description
- Sets the file size of an open file. The file can be truncated or enlarged by the function. The position of the file pointer is not affeced by this function.
- Parameters
Handle Handle to a file received by a previous call to osl_openFile().
uSize New size in bytes.
- Return
-
osl_File_E_None on success
osl_File_E_INVAL the format of the parameters was not valid
osl_File_E_OVERFLOW the resulting file offset would be a value which cannot be represented correctly for regular files
- See Also
- osl_openFile()
osl_setFilePos()
osl_getFileStatus()
osl_getFileSize()
- osl_setFileTime
- extern "C"
oslFileError osl_setFileTime( rtl_uString * pustrFileURL, const TimeValue * aCreationTime, const TimeValue * aLastAccessTime, const TimeValue * aLastWriteTime );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Set the file time.
- Parameters
pustrFileURL The full qualified URL of the file.
aCreationTime Creation time of the given file.
aLastAccessTime Time of the last access of the given file.
aLastWriteTime Time of the last modifying of the given file.
- Return
-
osl_File_E_None on success
osl_File_E_INVAL the format of the parameters was not valid
osl_File_E_NOENT no such file or directory not found
- See Also
- osl_getFileStatus()
- osl_syncFile
- extern "C"
oslFileError osl_syncFile( oslFileHandle Handle );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Synchronize the memory representation of a file with that on the physical medium.
- Description
- The function ensures that all modified data and attributes of the file associated with the given file handle have been written to the physical medium. In case the hard disk has a write cache enabled, the data may not really be on permanent storage when osl_syncFile returns.
- Parameters
Handle [in] Handle to a file received by a previous call to osl_openFile().
- Return
-
- osl_File_E_None
- On success
- osl_File_E_INVAL
- The value of the input parameter is invalid
In addition to these error codes others may occur as well, for instance:
- osl_File_E_BADF
- The file associated with the given file handle is not open for writing
- osl_File_E_IO
- An I/O error occurred
- osl_File_E_NOSPC
- There is no enough space on the target device
- osl_File_E_ROFS
- The file associated with the given file handle is located on a read only file system
- osl_File_E_TIMEDOUT
- A remote connection timed out. This may happen when a file is on a remote location
- See Also
- osl_openFile()
osl_writeFile()
- osl_unmapFile
- extern "C"
oslFileError osl_unmapFile( void * pAddr, sal_uInt64 uLength );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Unmap a shared file from memory.
- Since
- UDK 3.2.10
- osl_unmountVolumeDevice
- extern "C"
oslFileError osl_unmountVolumeDevice( oslVolumeDeviceHandle Handle );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Unmount a volume device.
- Description
- Unmount the volume specified by the given oslVolumeDeviceHandle.
- Parameters
Handle An oslVolumeDeviceHandle received by a call to osl_getVolumeInformation().
- Return
-
osl_File_E_None on success
- Todos
- specify all error codes that may be returned
- See Also
- osl_getVolumeInformation()
- osl_writeFile
- extern "C"
oslFileError osl_writeFile( oslFileHandle Handle, const void * pBuffer, sal_uInt64 uBytesToWrite, sal_uInt64 * pBytesWritten );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Write a number of bytes to a file.
- Description
- Writes a number of bytes to a file. The internal file pointer is increased by the number of bytes read.
- Parameters
Handle Handle to a file received by a previous call to osl_openFile().
pBuffer Points to a buffer which contains the data.
uBytesToWrite Number of bytes which should be written.
pBytesWritten On success the number of bytes which have actually been written.
- Return
-
osl_File_E_None on success
osl_File_E_INVAL the format of the parameters was not valid
osl_File_E_FBIG file too large
osl_File_E_DQUOT quota exceededosl_File_E_AGAIN operation would block
osl_File_E_BADF bad file
osl_File_E_FAULT bad address
osl_File_E_INTR function call was interrupted
osl_File_E_IO on I/O errosr
osl_File_E_NOLCK no record locks available
osl_File_E_NOLINK link has been severed
osl_File_E_NOSPC no space left on device
osl_File_E_NXIO no such device or address
- See Also
- osl_openFile()
osl_readFile()
osl_setFilePos()
- osl_writeFileAt
- extern "C"
oslFileError osl_writeFileAt( oslFileHandle Handle, sal_uInt64 uOffset, const void * pBuffer, sal_uInt64 uBytesToWrite, sal_uInt64 * pBytesWritten );
- extern "C"
virtual abstract const volatile template static inline C-linkage NO NO NO NO NO NO NO YES
- Summary
- Write a number of bytes to a specified offset in a file.
- Description
- The current position of the internal file pointer may or may not be changed.
- Since
- UDK 3.2.10
Top of Page
Copyright © 2012, The Apache Software Foundation, Licensed under the Apache License, Version 2.0. Apache, the Apache feather logo, Apache OpenOffice and OpenOffice.org are trademarks of The Apache Software Foundation. Other names may be trademarks of their respective owners.