pdirect.h
上传用户:hzhsqp
上传日期:2007-01-06
资源大小:1600k
文件大小:2k
源码类别:

IP电话/视频会议

开发平台:

Visual C++

  1. /*
  2.  * pdirect.h
  3.  *
  4.  * File system directory class.
  5.  *
  6.  * Portable Windows Library
  7.  *
  8.  * Copyright (c) 1993-1998 Equivalence Pty. Ltd.
  9.  *
  10.  * The contents of this file are subject to the Mozilla Public License
  11.  * Version 1.0 (the "License"); you may not use this file except in
  12.  * compliance with the License. You may obtain a copy of the License at
  13.  * http://www.mozilla.org/MPL/
  14.  *
  15.  * Software distributed under the License is distributed on an "AS IS"
  16.  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
  17.  * the License for the specific language governing rights and limitations
  18.  * under the License.
  19.  *
  20.  * The Original Code is Portable Windows Library.
  21.  *
  22.  * The Initial Developer of the Original Code is Equivalence Pty. Ltd.
  23.  *
  24.  * Portions are Copyright (C) 1993 Free Software Foundation, Inc.
  25.  * All Rights Reserved.
  26.  *
  27.  * Contributor(s): ______________________________________.
  28.  *
  29.  * $Log: pdirect.h,v $
  30.  * Revision 1.7  1999/03/09 03:08:39  robertj
  31.  * Changes for new documentation system
  32.  *
  33.  * Revision 1.6  1998/11/30 02:55:21  robertj
  34.  * New directory structure
  35.  *
  36.  * Revision 1.5  1998/09/24 03:30:14  robertj
  37.  * Added open software license.
  38.  *
  39.  * Revision 1.4  1996/08/08 10:09:06  robertj
  40.  * Directory structure changes for common files.
  41.  *
  42.  * Revision 1.3  1995/03/12 04:59:55  robertj
  43.  * Re-organisation of DOS/WIN16 and WIN32 platforms to maximise common code.
  44.  * Used built-in equate for WIN32 API (_WIN32).
  45.  *
  46.  * Revision 1.2  1994/10/24  00:15:21  robertj
  47.  * Changed PFilePath and PDirectory so descends from either PString or
  48.  *     PCaselessString depending on the platform.
  49.  *
  50.  * Revision 1.1  1994/06/25  12:13:01  robertj
  51.  * Initial revision
  52.  *
  53.  * Revision 1.1  1994/04/12  08:31:05  robertj
  54.  * Initial revision
  55.  *
  56.  */
  57. #ifndef _PDIRECTORY
  58. ///////////////////////////////////////////////////////////////////////////////
  59. // PDirectory
  60. #include <direct.h>
  61. #if !defined(_WIN32)
  62. #include <dos.h>
  63. #endif
  64. const char PDIR_SEPARATOR = '\';
  65. const PINDEX P_MAX_PATH = _MAX_PATH;
  66. typedef PCaselessString PFilePathString;
  67. #include "../../pdirect.h"
  68.   protected:
  69. #if defined(_WIN32)
  70.     HANDLE hFindFile;
  71.     WIN32_FIND_DATA fileinfo;
  72. #else
  73.     struct find_t fileinfo;
  74. #endif
  75.     BOOL Filtered();
  76.   public:
  77.     static PString CreateFullPath(const PString & path, BOOL isDirectory);
  78. };
  79. #endif