077137f1c602268ce62c760701f619a2ae929923vboxsync * IPRT - rtPathVolumeSpecLen
c58f1213e628a545081c70e26c6b67a841cff880vboxsync * Copyright (C) 2006-2012 Oracle Corporation
077137f1c602268ce62c760701f619a2ae929923vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
077137f1c602268ce62c760701f619a2ae929923vboxsync * available from http://www.virtualbox.org. This file is free software;
077137f1c602268ce62c760701f619a2ae929923vboxsync * you can redistribute it and/or modify it under the terms of the GNU
077137f1c602268ce62c760701f619a2ae929923vboxsync * General Public License (GPL) as published by the Free Software
077137f1c602268ce62c760701f619a2ae929923vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
077137f1c602268ce62c760701f619a2ae929923vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
077137f1c602268ce62c760701f619a2ae929923vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
077137f1c602268ce62c760701f619a2ae929923vboxsync * The contents of this file may alternatively be used under the terms
077137f1c602268ce62c760701f619a2ae929923vboxsync * of the Common Development and Distribution License Version 1.0
077137f1c602268ce62c760701f619a2ae929923vboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
077137f1c602268ce62c760701f619a2ae929923vboxsync * VirtualBox OSE distribution, in which case the provisions of the
077137f1c602268ce62c760701f619a2ae929923vboxsync * CDDL are applicable instead of those of the GPL.
077137f1c602268ce62c760701f619a2ae929923vboxsync * You may elect to license modified versions of this file under the
077137f1c602268ce62c760701f619a2ae929923vboxsync * terms and conditions of either the GPL or the CDDL or both.
077137f1c602268ce62c760701f619a2ae929923vboxsync/*******************************************************************************
077137f1c602268ce62c760701f619a2ae929923vboxsync* Header Files *
077137f1c602268ce62c760701f619a2ae929923vboxsync*******************************************************************************/
077137f1c602268ce62c760701f619a2ae929923vboxsync * Returns the length of the volume name specifier of the given path.
077137f1c602268ce62c760701f619a2ae929923vboxsync * If no such specifier zero is returned.
b6cc4092c1e80655a5bc19dc125e772a8d2b870dvboxsyncDECLHIDDEN(size_t) rtPathVolumeSpecLen(const char *pszPath)
b6b40d21fb1ce43de5586f09e3469f17c06d4d88vboxsync /* UNC path. */
077137f1c602268ce62c760701f619a2ae929923vboxsync /** @todo r=bird: it's UNC and we have to check that the next char isn't a
077137f1c602268ce62c760701f619a2ae929923vboxsync * slash, then skip both the server and the share name. */
077137f1c602268ce62c760701f619a2ae929923vboxsync /* Drive letter. */
077137f1c602268ce62c760701f619a2ae929923vboxsync /* This isn't quite right when looking at the above stuff, but it works assuming that '//' does not mean UNC. */
077137f1c602268ce62c760701f619a2ae929923vboxsync /// @todo (dmik) well, it's better to consider there's no volume name
077137f1c602268ce62c760701f619a2ae929923vboxsync // at all on *nix systems
077137f1c602268ce62c760701f619a2ae929923vboxsync// return pszPath && pszPath[0] == '/';