fs.h revision 36004000e897ff86c5e7a4d5f549d40eb028cc92
c74832c7184337c330041742d88e6dacaa07b378vboxsync/* $Id$ */
c74832c7184337c330041742d88e6dacaa07b378vboxsync/** @file
c74832c7184337c330041742d88e6dacaa07b378vboxsync * IPRT - Internal RTFs header.
d192cc72774b02a0df2fdd46350d418236ac09aevboxsync */
d192cc72774b02a0df2fdd46350d418236ac09aevboxsync
c74832c7184337c330041742d88e6dacaa07b378vboxsync/*
c74832c7184337c330041742d88e6dacaa07b378vboxsync * Copyright (C) 2006-2007 Sun Microsystems, Inc.
c74832c7184337c330041742d88e6dacaa07b378vboxsync *
c74832c7184337c330041742d88e6dacaa07b378vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
c74832c7184337c330041742d88e6dacaa07b378vboxsync * available from http://www.virtualbox.org. This file is free software;
c74832c7184337c330041742d88e6dacaa07b378vboxsync * you can redistribute it and/or modify it under the terms of the GNU
c74832c7184337c330041742d88e6dacaa07b378vboxsync * General Public License (GPL) as published by the Free Software
c74832c7184337c330041742d88e6dacaa07b378vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
c74832c7184337c330041742d88e6dacaa07b378vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
c74832c7184337c330041742d88e6dacaa07b378vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
c74832c7184337c330041742d88e6dacaa07b378vboxsync *
c74832c7184337c330041742d88e6dacaa07b378vboxsync * The contents of this file may alternatively be used under the terms
c74832c7184337c330041742d88e6dacaa07b378vboxsync * of the Common Development and Distribution License Version 1.0
c74832c7184337c330041742d88e6dacaa07b378vboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
c74832c7184337c330041742d88e6dacaa07b378vboxsync * VirtualBox OSE distribution, in which case the provisions of the
c74832c7184337c330041742d88e6dacaa07b378vboxsync * CDDL are applicable instead of those of the GPL.
c74832c7184337c330041742d88e6dacaa07b378vboxsync *
c74832c7184337c330041742d88e6dacaa07b378vboxsync * You may elect to license modified versions of this file under the
c74832c7184337c330041742d88e6dacaa07b378vboxsync * terms and conditions of either the GPL or the CDDL or both.
c74832c7184337c330041742d88e6dacaa07b378vboxsync *
da957c069c2a3c582fe265ff88170ce4c42b499dvboxsync * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
c74832c7184337c330041742d88e6dacaa07b378vboxsync * Clara, CA 95054 USA or visit http://www.sun.com if you need
c74832c7184337c330041742d88e6dacaa07b378vboxsync * additional information or have any questions.
c74832c7184337c330041742d88e6dacaa07b378vboxsync */
c74832c7184337c330041742d88e6dacaa07b378vboxsync
c74832c7184337c330041742d88e6dacaa07b378vboxsync#ifndef ___internal_fs_h
c74832c7184337c330041742d88e6dacaa07b378vboxsync#define ___internal_fs_h
c74832c7184337c330041742d88e6dacaa07b378vboxsync
c74832c7184337c330041742d88e6dacaa07b378vboxsync#include <iprt/types.h>
c74832c7184337c330041742d88e6dacaa07b378vboxsync#ifndef RT_OS_WINDOWS
c74832c7184337c330041742d88e6dacaa07b378vboxsync# include <sys/stat.h>
c74832c7184337c330041742d88e6dacaa07b378vboxsync#endif
c74832c7184337c330041742d88e6dacaa07b378vboxsync
c74832c7184337c330041742d88e6dacaa07b378vboxsync__BEGIN_DECLS
c74832c7184337c330041742d88e6dacaa07b378vboxsync
c74832c7184337c330041742d88e6dacaa07b378vboxsyncRTFMODE rtFsModeFromDos(RTFMODE fMode, const char *pszName, size_t cbName);
c74832c7184337c330041742d88e6dacaa07b378vboxsyncRTFMODE rtFsModeFromUnix(RTFMODE fMode, const char *pszName, size_t cbName);
c74832c7184337c330041742d88e6dacaa07b378vboxsyncRTFMODE rtFsModeNormalize(RTFMODE fMode, const char *pszName, size_t cbName);
c74832c7184337c330041742d88e6dacaa07b378vboxsyncbool rtFsModeIsValid(RTFMODE fMode);
c74832c7184337c330041742d88e6dacaa07b378vboxsyncbool rtFsModeIsValidPermissions(RTFMODE fMode);
c74832c7184337c330041742d88e6dacaa07b378vboxsync
c74832c7184337c330041742d88e6dacaa07b378vboxsyncsize_t rtPathVolumeSpecLen(const char *pszPath);
c74832c7184337c330041742d88e6dacaa07b378vboxsync#ifndef RT_OS_WINDOWS
c74832c7184337c330041742d88e6dacaa07b378vboxsyncvoid rtFsConvertStatToObjInfo(PRTFSOBJINFO pObjInfo, const struct stat *pStat, const char *pszName, unsigned cbName);
c74832c7184337c330041742d88e6dacaa07b378vboxsync#endif
c74832c7184337c330041742d88e6dacaa07b378vboxsync
c74832c7184337c330041742d88e6dacaa07b378vboxsync#ifdef RT_OS_LINUX
c74832c7184337c330041742d88e6dacaa07b378vboxsync# ifdef __USE_MISC
c74832c7184337c330041742d88e6dacaa07b378vboxsync# define HAVE_STAT_TIMESPEC_BRIEF
c74832c7184337c330041742d88e6dacaa07b378vboxsync# else
c74832c7184337c330041742d88e6dacaa07b378vboxsync# define HAVE_STAT_NSEC
c74832c7184337c330041742d88e6dacaa07b378vboxsync# endif
c74832c7184337c330041742d88e6dacaa07b378vboxsync#endif
c74832c7184337c330041742d88e6dacaa07b378vboxsync
c74832c7184337c330041742d88e6dacaa07b378vboxsync__END_DECLS
c74832c7184337c330041742d88e6dacaa07b378vboxsync
c74832c7184337c330041742d88e6dacaa07b378vboxsync#endif
0c34933fc8f84dd5183d1897881bbc7683d24541vboxsync