path.h revision 677833bc953b6cb418c701facbdcf4aa18d6c44e
/* $Id$ */
/** @file
* InnoTek Portable Runtime - RTPath Internal header.
*/
/*
* Copyright (C) 2006 InnoTek Systemberatung GmbH
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License as published by the Free Software Foundation,
* in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
* distribution. VirtualBox OSE is distributed in the hope that it will
* be useful, but WITHOUT ANY WARRANTY of any kind.
*
* If you received this file as part of a commercial VirtualBox
* distribution, then only the terms of your commercial VirtualBox
* license agreement apply instead of the previous paragraph.
*/
#ifndef __path_h__
#define __path_h__
extern char g_szrtProgramPath[RTPATH_MAX];
# define HAVE_UNC 1
# define HAVE_DRIVE 1
#endif
int rtPathWin32MoveRename(const char *pszSrc, const char *pszDst, uint32_t fFlags, RTFMODE fFileType);
/**
* Converts a path from IPRT to native representation.
*
* This may involve querying filesystems what codeset they
* speak and so forth.
*
* @returns IPRT status code.
* @param ppszNativePath Where to store the pointer to the native path.
* Free by calling rtPathFreeHost(). NULL on failure.
* @param pszPath The path to convert.
* @remark This function is not available on hosts using something else than byte seqences as names. (eg win32)
*/
/**
* Converts a path from IPRT to native representation.
*
* This may involve querying filesystems what codeset they
* speak and so forth.
*
* @returns IPRT status code.
* @param ppszNativePath Where to store the pointer to the native path.
* Free by calling rtPathFreeHost(). NULL on failure.
* @param pszPath The path to convert.
* @param pszBasePath What pszPath is relative to. If NULL the function behaves like rtPathToNative().
* @remark This function is not available on hosts using something else than byte seqences as names. (eg win32)
*/
/**
* Frees a native path returned by rtPathToNative() or rtPathToNativeEx().
*
* @param pszNativePath The host path to free. NULL allowed.
* @remark This function is not available on hosts using something else than byte seqences as names. (eg win32)
*/
void rtPathFreeNative(char *pszNativePath);
/**
* Converts a path from the native to the IPRT representation.
*
* @returns IPRT status code.
* @param ppszPath Where to store the pointer to the IPRT path.
* Free by calling RTStrFree(). NULL on failure.
* @param pszNativePath The native path to convert.
* @remark This function is not available on hosts using something else than byte seqences as names. (eg win32)
*/
/**
* Converts a path from the native to the IPRT representation.
*
* @returns IPRT status code.
* @param ppszPath Where to store the pointer to the IPRT path.
* Free by calling RTStrFree(). NULL on failure.
* @param pszNativePath The native path to convert.
* @param pszBasePath What pszHostPath is relative to - in IPRT representation.
* If NULL the function behaves like rtPathFromNative().
* @remark This function is not available on hosts using something else than byte seqences as names. (eg win32)
*/
#endif