⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 file_8h-source.html

📁 pwlib开发文档
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>file.h Source File</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.18 --><center><a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center><hr><h1>file.h</h1><a href="file_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/*</span>00002 <span class="comment"> * file.h</span>00003 <span class="comment"> *</span>00004 <span class="comment"> * Operating System file I/O channel class.</span>00005 <span class="comment"> *</span>00006 <span class="comment"> * Portable Windows Library</span>00007 <span class="comment"> *</span>00008 <span class="comment"> * Copyright (c) 1993-1998 Equivalence Pty. Ltd.</span>00009 <span class="comment"> *</span>00010 <span class="comment"> * The contents of this file are subject to the Mozilla Public License</span>00011 <span class="comment"> * Version 1.0 (the "License"); you may not use this file except in</span>00012 <span class="comment"> * compliance with the License. You may obtain a copy of the License at</span>00013 <span class="comment"> * http://www.mozilla.org/MPL/</span>00014 <span class="comment"> *</span>00015 <span class="comment"> * Software distributed under the License is distributed on an "AS IS"</span>00016 <span class="comment"> * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See</span>00017 <span class="comment"> * the License for the specific language governing rights and limitations</span>00018 <span class="comment"> * under the License.</span>00019 <span class="comment"> *</span>00020 <span class="comment"> * The Original Code is Portable Windows Library.</span>00021 <span class="comment"> *</span>00022 <span class="comment"> * The Initial Developer of the Original Code is Equivalence Pty. Ltd.</span>00023 <span class="comment"> *</span>00024 <span class="comment"> * Portions are Copyright (C) 1993 Free Software Foundation, Inc.</span>00025 <span class="comment"> * All Rights Reserved.</span>00026 <span class="comment"> *</span>00027 <span class="comment"> * Contributor(s): ______________________________________.</span>00028 <span class="comment"> *</span>00029 <span class="comment"> * $Log: file.h,v $</span>00030 <span class="comment"> * Revision 1.42  2003/09/26 09:58:50  rogerhardiman</span>00031 <span class="comment"> * Move #include &lt;sys/stat.h&gt; from the unix file.h to the main file.h</span>00032 <span class="comment"> * FreeBSD's sys/stat.h includes extern "C" for some prototypes and you</span>00033 <span class="comment"> * cannot have an extern "C" in the middle of a C++ class</span>00034 <span class="comment"> *</span>00035 <span class="comment"> * Revision 1.41  2003/09/17 05:41:58  csoutheren</span>00036 <span class="comment"> * Removed recursive includes</span>00037 <span class="comment"> *</span>00038 <span class="comment"> * Revision 1.40  2003/09/17 01:18:02  csoutheren</span>00039 <span class="comment"> * Removed recursive include file system and removed all references</span>00040 <span class="comment"> * to deprecated coooperative threading support</span>00041 <span class="comment"> *</span>00042 <span class="comment"> * Revision 1.39  2002/09/16 01:08:59  robertj</span>00043 <span class="comment"> * Added #define so can select if #pragma interface/implementation is used on</span>00044 <span class="comment"> *   platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan.</span>00045 <span class="comment"> *</span>00046 <span class="comment"> * Revision 1.38  2002/07/02 08:00:55  craigs</span>00047 <span class="comment"> * Also made GetPosition, SetPosition and SetLength virtual as well</span>00048 <span class="comment"> *</span>00049 <span class="comment"> * Revision 1.37  2002/07/02 07:59:42  craigs</span>00050 <span class="comment"> * Added virtual to GetLength call</span>00051 <span class="comment"> *</span>00052 <span class="comment"> * Revision 1.36  2002/01/13 20:54:55  rogerh</span>00053 <span class="comment"> * Make the other Open() virtual so it can be overridden (eg in PWAVFile)</span>00054 <span class="comment"> *</span>00055 <span class="comment"> * Revision 1.35  2001/05/22 12:49:32  robertj</span>00056 <span class="comment"> * Did some seriously wierd rewrite of platform headers to eliminate the</span>00057 <span class="comment"> *   stupid GNU compiler warning about braces not matching.</span>00058 <span class="comment"> *</span>00059 <span class="comment"> * Revision 1.34  2000/09/27 05:58:07  craigs</span>00060 <span class="comment"> * Added virtual to PFile::Open to allow overriding in descandant classes</span>00061 <span class="comment"> *</span>00062 <span class="comment"> * Revision 1.33  2000/07/09 14:05:46  robertj</span>00063 <span class="comment"> * Added file share options.</span>00064 <span class="comment"> *</span>00065 <span class="comment"> * Revision 1.32  1999/06/13 13:54:07  robertj</span>00066 <span class="comment"> * Added PConsoleChannel class for access to stdin/stdout/stderr.</span>00067 <span class="comment"> *</span>00068 <span class="comment"> * Revision 1.31  1999/06/09 02:05:20  robertj</span>00069 <span class="comment"> * Added ability to open file as standard input, output and error streams.</span>00070 <span class="comment"> *</span>00071 <span class="comment"> * Revision 1.30  1999/03/09 02:59:49  robertj</span>00072 <span class="comment"> * Changed comments to doc++ compatible documentation.</span>00073 <span class="comment"> *</span>00074 <span class="comment"> * Revision 1.29  1999/02/16 08:07:11  robertj</span>00075 <span class="comment"> * MSVC 6.0 compatibility changes.</span>00076 <span class="comment"> *</span>00077 <span class="comment"> * Revision 1.28  1998/09/23 06:20:35  robertj</span>00078 <span class="comment"> * Added open source copyright license.</span>00079 <span class="comment"> *</span>00080 <span class="comment"> * Revision 1.27  1995/07/31 12:15:43  robertj</span>00081 <span class="comment"> * Removed PContainer from PChannel ancestor.</span>00082 <span class="comment"> *</span>00083 <span class="comment"> * Revision 1.26  1995/06/17 11:12:33  robertj</span>00084 <span class="comment"> * Documentation update.</span>00085 <span class="comment"> *</span>00086 <span class="comment"> * Revision 1.25  1995/04/22 00:43:57  robertj</span>00087 <span class="comment"> * Added Move() function and changed semantics of Rename().</span>00088 <span class="comment"> * Changed all file name strings to PFilePath objects.</span>00089 <span class="comment"> *</span>00090 <span class="comment"> * Revision 1.24  1995/03/14 12:41:23  robertj</span>00091 <span class="comment"> * Updated documentation to use HTML codes.</span>00092 <span class="comment"> *</span>00093 <span class="comment"> * Revision 1.23  1995/03/12  04:37:13  robertj</span>00094 <span class="comment"> * Moved GetHandle() function from PFile to PChannel.</span>00095 <span class="comment"> *</span>00096 <span class="comment"> * Revision 1.22  1995/01/14  06:22:11  robertj</span>00097 <span class="comment"> * Documentation</span>00098 <span class="comment"> *</span>00099 <span class="comment"> * Revision 1.21  1994/12/21  11:52:54  robertj</span>00100 <span class="comment"> * Documentation and variable normalisation.</span>00101 <span class="comment"> *</span>00102 <span class="comment"> * Revision 1.20  1994/08/23  11:32:52  robertj</span>00103 <span class="comment"> * Oops</span>00104 <span class="comment"> *</span>00105 <span class="comment"> * Revision 1.19  1994/08/22  00:46:48  robertj</span>00106 <span class="comment"> * Added pragma fro GNU C++ compiler.</span>00107 <span class="comment"> *</span>00108 <span class="comment"> * Revision 1.18  1994/08/21  23:43:02  robertj</span>00109 <span class="comment"> * Added "remove on close" feature for temporary files.</span>00110 <span class="comment"> * Added "force" option to Remove/Rename etc to override write protection.</span>00111 <span class="comment"> * Added function to set file permissions.</span>00112 <span class="comment"> *</span>00113 <span class="comment"> * Revision 1.17  1994/07/17  10:46:06  robertj</span>00114 <span class="comment"> * Moved data to platform dependent files.</span>00115 <span class="comment"> *</span>00116 <span class="comment"> * Revision 1.16  1994/06/25  11:55:15  robertj</span>00117 <span class="comment"> * Unix version synchronisation.</span>00118 <span class="comment"> *</span>00119 <span class="comment"> * Revision 1.15  1994/04/20  12:17:44  robertj</span>00120 <span class="comment"> * Split name into PFilePath</span>00121 <span class="comment"> *</span>00122 <span class="comment"> * Revision 1.14  1994/04/01  14:11:03  robertj</span>00123 <span class="comment"> * Added const to functions.</span>00124 <span class="comment"> * Added SetName function.</span>00125 <span class="comment"> *</span>00126 <span class="comment"> * Revision 1.13  1994/03/07  07:38:19  robertj</span>00127 <span class="comment"> * Major enhancementsacross the board.</span>00128 <span class="comment"> *</span>00129 <span class="comment"> * Revision 1.12  1994/01/13  03:40:22  robertj</span>00130 <span class="comment"> * Added hidden flag to file info.</span>00131 <span class="comment"> *</span>00132 <span class="comment"> * Revision 1.12  1994/01/13  03:36:48  robertj</span>00133 <span class="comment"> * Created intermediate class PInteractorLayout for dialog-ish windows.</span>00134 <span class="comment"> *</span>00135 <span class="comment"> * Revision 1.11  1994/01/03  04:42:23  robertj</span>00136 <span class="comment"> * Mass changes to common container classes and interactors etc etc etc.</span>00137 <span class="comment"> *</span>00138 <span class="comment"> * Revision 1.10  1993/12/31  06:45:38  robertj</span>00139 <span class="comment"> * Made inlines optional for debugging purposes.</span>00140 <span class="comment"> *</span>00141 <span class="comment"> * Revision 1.9  1993/09/27  16:35:25  robertj</span>00142 <span class="comment"> * Changed GetName() to GetTitle(), better naming convention.</span>00143 <span class="comment"> * Moved internal functions to private section.</span>00144 <span class="comment"> *</span>00145 <span class="comment"> * Revision 1.8  1993/08/31  03:38:02  robertj</span>00146 <span class="comment"> * Changed PFile::Status to PFile::Info due to X-Windows compatibility.</span>00147 <span class="comment"> *</span>00148 <span class="comment"> * Revision 1.7  1993/08/27  18:17:47  robertj</span>00149 <span class="comment"> * Moved code from MS-DOS platform to common files.</span>00150 <span class="comment"> *</span>00151 <span class="comment"> * Revision 1.6  1993/08/21  04:40:19  robertj</span>00152 <span class="comment"> * Added Copy() function.</span>00153 <span class="comment"> *</span>00154 <span class="comment"> * Revision 1.5  1993/08/21  01:50:33  robertj</span>00155 <span class="comment"> * Made Clone() function optional, default will assert if called.</span>00156 <span class="comment"> *</span>00157 <span class="comment"> * Revision 1.4  1993/08/01  14:05:27  robertj</span>00158 <span class="comment"> * Added GetFileName() function required for proper portability.</span>00159 <span class="comment"> * Improved some comments.</span>00160 <span class="comment"> *</span>00161 <span class="comment"> * Revision 1.3  1993/07/14  12:49:16  robertj</span>00162 <span class="comment"> * Fixed RCS keywords.</span>00163 <span class="comment"> *</span>00164 <span class="comment"> */</span>00165 00166 00167 <span class="preprocessor">#ifndef _PFILE</span>00168 <span class="preprocessor"></span><span class="preprocessor">#define _PFILE</span>00169 <span class="preprocessor"></span>00170 <span class="preprocessor">#ifdef P_USE_PRAGMA</span>00171 <span class="preprocessor"></span><span class="preprocessor">#pragma interface</span>00172 <span class="preprocessor"></span><span class="preprocessor">#endif</span>00173 <span class="preprocessor"></span>00174 <span class="preprocessor">#ifndef _WIN32</span>00175 <span class="preprocessor"></span><span class="preprocessor">#include &lt;sys/stat.h&gt;</span>00176 <span class="preprocessor">#endif</span>00177 <span class="preprocessor"></span>00178 00179 00181 <span class="comment">// Binary Files</span>00182 <a name="l00192"></a><a class="code" href="classPFile.html">00192</a> <span class="keyword">class </span><a class="code" href="classPFile.html">PFile</a> : <span class="keyword">public</span> <a class="code" href="classPChannel.html">PChannel</a>00193 {00194   <a class="code" href="object_8h.html#a27">PCLASSINFO</a>(<a class="code" href="classPFile.html">PFile</a>, <a class="code" href="classPChannel.html">PChannel</a>);00195 00196   <span class="keyword">public</span>:

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -