diff options
Diffstat (limited to 'include/iprt/vfs.h')
-rw-r--r-- | include/iprt/vfs.h | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/include/iprt/vfs.h b/include/iprt/vfs.h index 6eefa01d..787c1b39 100644 --- a/include/iprt/vfs.h +++ b/include/iprt/vfs.h @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 2010 Oracle Corporation + * Copyright (C) 2010-2012 Oracle Corporation * * This file is part of VirtualBox Open Source Edition (OSE), as * available from http://www.virtualbox.org. This file is free software; @@ -332,7 +332,7 @@ RTDECL(uint32_t) RTVfsDirRelease(RTVFSDIR hVfsDir); /** @} */ -/** @defgroup grp_vfs_iostream VFS Symbolic Link API +/** @defgroup grp_vfs_symlink VFS Symbolic Link API * * @remarks The TAR VFS and filesystem stream uses symbolic links for * describing hard links as well. The users must use RTFS_IS_SYMLINK @@ -452,6 +452,17 @@ RTDECL(int) RTVfsSymlinkRead(RTVFSSYMLINK hVfsSym, char *pszTarget, size RTDECL(int) RTVfsIoStrmFromRTFile(RTFILE hFile, uint64_t fOpen, bool fLeaveOpen, PRTVFSIOSTREAM phVfsIos); /** + * Convenience function combining RTFileOpen with RTVfsIoStrmFromRTFile. + * + * @returns IPRT status code. + * @param pszFilename The path to the file in the normal file system. + * @param fOpen The flags to pass to RTFileOpen when opening the + * file, i.e. RTFILE_O_XXX. + * @param phVfsIos Where to return the VFS I/O stream handle. + */ +RTDECL(int) RTVfsIoStrmOpenNormal(const char *pszFilename, uint64_t fOpen, PRTVFSIOSTREAM phVfsIos); + +/** * Create a VFS I/O stream handle from one of the standard handles. * * @returns IPRT status code. @@ -594,7 +605,7 @@ RTDECL(int) RTVfsIoStrmSgRead(RTVFSIOSTREAM hVfsIos, PCRTSGBUF pSgBuf, b * attemted written. * @param fBlocking Whether the call is blocking (@c true) or not. If * not, the @a pcbWritten parameter must not be NULL. - * @param pcbRead Where to always store the number of bytes actually + * @param pcbWritten Where to always store the number of bytes actually * written. This can be NULL if @a fBlocking is true. * @sa RTFileSgWrite, RTSocketSgWrite */ @@ -705,6 +716,17 @@ RTDECL(int) RTVfsFileFromRTFile(RTFILE hFile, uint64_t fOpen, bool fLeav RTDECL(RTHCUINTPTR) RTVfsFileToNative(RTFILE hVfsFile); /** + * Convenience function combining RTFileOpen with RTVfsFileFromRTFile. + * + * @returns IPRT status code. + * @param pszFilename The path to the file in the normal file system. + * @param fOpen The flags to pass to RTFileOpen when opening the + * file, i.e. RTFILE_O_XXX. + * @param phVfsFile Where to return the VFS file handle. + */ +RTDECL(int) RTVfsFileOpenNormal(const char *pszFilename, uint64_t fOpen, PRTVFSFILE phVfsFile); + +/** * Convert the VFS file handle to a VFS I/O stream handle. * * @returns The VFS I/O stream handle on success, this must be released. |