fs.cpp revision c311f6bb5c2cf593011d936683dc5bdb5b9eb81a
432N/A * Copyright (C) 2006-2007 Sun Microsystems, Inc. 432N/A * This file is part of VirtualBox Open Source Edition (OSE), as 432N/A * you can redistribute it and/or modify it under the terms of the GNU 432N/A * General Public License (GPL) as published by the Free Software 432N/A * Foundation, in version 2 as it comes in the "COPYING" file of the 432N/A * VirtualBox OSE distribution. VirtualBox OSE is distributed in the 432N/A * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. 432N/A * The contents of this file may alternatively be used under the terms 432N/A * of the Common Development and Distribution License Version 1.0 432N/A * (CDDL) only, as it comes in the "COPYING.CDDL" file of the 432N/A * VirtualBox OSE distribution, in which case the provisions of the 1371N/A * CDDL are applicable instead of those of the GPL. 1094N/A * You may elect to license modified versions of this file under the 432N/A * terms and conditions of either the GPL or the CDDL or both. 1461N/A * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa 1461N/A * additional information or have any questions. 432N/A/******************************************************************************* 1461N/A*******************************************************************************/ 1027N/A * Converts dos-style attributes to Unix attributes. 1371N/A * @param fMode The mode mask containing dos-style attibutes only. 432N/A * @param pszName The filename which this applies to (exe check). 432N/A * @param cbName The length of that filename. (optional, set 0) 1435N/A /* everything is readable. */ 1435N/A /* directories are executable. */ 1371N/A /* check for executable extension. */ * Converts Unix attributes to Dos-style attributes. * @returns File mode mask. * @param fMode The mode mask containing dos-style attibutes only. * @param pszName The filename which this applies to (hidden check). * @param cbName The length of that filename. (optional, set 0) * Converts dos-style attributes to Unix attributes. * @returns Normalized file mode. * @param fMode The mode mask containing dos-style attibutes only. * @param pszName The filename which this applies to (exe check). * @param cbName The length of that filename. (optional, set 0) * Checks if the file mode is valid or not. * @return false if invalid, done bitching. * @param fMode The file mode. (
"%RTfmode\n",
fMode),
false);
(
"%RTfmode\n",
fMode),
false);
/** @todo more checks! */ * Checks if the file mode is valid as a permission mask or not. * @return false if invalid, done bitching. * @param fMode The file mode. (
"%RTfmode\n",
fMode),
false);
/** @todo more checks! */ * Internal worker function which setups RTFSOBJINFO based on a UNIX stat struct. * @param pObjInfo The file system object info structure to setup. * @param pStat The stat structure to use. * @param pszName The filename which this applies to (exe/hidden check). * @param cbName The length of that filename. (optional, set 0) #
else /* just the normal stuff */#
error "S_ISVTX / S_ISTXT isn't defined" /* additional unix attribs */ #
endif /* !RT_OS_WINDOWS */