reSIProcate/rutil  9694
testFileSystem.cxx
Go to the documentation of this file.
00001 #include "rutil/FileSystem.hxx"
00002 #include <iostream>
00003 
00004 using namespace resip;
00005 using namespace std;
00006 
00007 int
00008 main()
00009 {
00010 #ifdef WIN32
00011    FileSystem::Directory dir("c:\\windows\\");
00012 #else
00013    FileSystem::Directory dir("/usr/bin/");
00014 #endif
00015    for (FileSystem::Directory::iterator it = dir.begin(); it != dir.end(); ++it)
00016    {
00017       cerr << *it << endl;
00018    }
00019    return 0;
00020 }
00021 
00022 /* ====================================================================
00023  * The Vovida Software License, Version 1.0 
00024  * 
00025  * Copyright (c) 2005 Vovida Networks, Inc.  All rights reserved.
00026  * 
00027  * Redistribution and use in source and binary forms, with or without
00028  * modification, are permitted provided that the following conditions
00029  * are met:
00030  * 
00031  * 1. Redistributions of source code must retain the above copyright
00032  *    notice, this list of conditions and the following disclaimer.
00033  * 
00034  * 2. Redistributions in binary form must reproduce the above copyright
00035  *    notice, this list of conditions and the following disclaimer in
00036  *    the documentation and/or other materials provided with the
00037  *    distribution.
00038  * 
00039  * 3. The names "VOCAL", "Vovida Open Communication Application Library",
00040  *    and "Vovida Open Communication Application Library (VOCAL)" must
00041  *    not be used to endorse or promote products derived from this
00042  *    software without prior written permission. For written
00043  *    permission, please contact vocal@vovida.org.
00044  *
00045  * 4. Products derived from this software may not be called "VOCAL", nor
00046  *    may "VOCAL" appear in their name, without prior written
00047  *    permission of Vovida Networks, Inc.
00048  * 
00049  * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
00050  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
00051  * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
00052  * NON-INFRINGEMENT ARE DISCLAIMED.  IN NO EVENT SHALL VOVIDA
00053  * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
00054  * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
00055  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00056  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00057  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
00058  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00059  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
00060  * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00061  * DAMAGE.
00062  * 
00063  * ====================================================================
00064  * 
00065  * This software consists of voluntary contributions made by Vovida
00066  * Networks, Inc. and many individuals on behalf of Vovida Networks,
00067  * Inc.  For more information on Vovida Networks, Inc., please see
00068  * <http://www.vovida.org/>.
00069  *
00070  */