tstDir-2.cpp revision 5eabf773597082761832bc0a32b3660e8771f9f1
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync * IPRT Testcase - Directory listing & filtering .
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync * Copyright (C) 2006-2007 Sun Microsystems, Inc.
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync * available from http://www.virtualbox.org. This file is free software;
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync * you can redistribute it and/or modify it under the terms of the GNU
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync * General Public License (GPL) as published by the Free Software
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync * The contents of this file may alternatively be used under the terms
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync * of the Common Development and Distribution License Version 1.0
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync * VirtualBox OSE distribution, in which case the provisions of the
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync * CDDL are applicable instead of those of the GPL.
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync * You may elect to license modified versions of this file under the
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync * terms and conditions of either the GPL or the CDDL or both.
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync * Clara, CA 95054 USA or visit http://www.sun.com if you need
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync * additional information or have any questions.
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync * Iterate arguments.
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync int rc = RTDirOpenFiltered(&pDir, argv[i], RTDIRFILTER_WINNT);
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync case RTDIRENTRYTYPE_DEV_CHAR: RTPrintf("c"); break;
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync case RTDIRENTRYTYPE_DIRECTORY: RTPrintf("d"); break;
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync case RTDIRENTRYTYPE_DEV_BLOCK: RTPrintf("b"); break;
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync case RTDIRENTRYTYPE_WHITEOUT: RTPrintf("w"); break;
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync RTPrintf(" %#18llx %3d %s\n", (uint64_t)DirEntry.INodeId,
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync RTPrintf("tstDir-2: Enumeration failed! rc=%Rrc\n", rc);
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync /* close up */
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync RTPrintf("tstDir-2: Failed to close dir! rc=%Rrc\n", rc);
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync RTPrintf("tstDir-2: Failed to open '%s', rc=%Rrc\n", argv[i], rc);