📄 file.html
字号:
<dd>
<p>The file or directory is an archive file or directory. Applications use
this attribute to mark files for backup or removal.</p>
</dd>
</li>
<dt><strong><a name="item_file_attribute_compressed"><code>FILE_ATTRIBUTE_COMPRESSED</code></a></strong>
<dd>
<p>The file or directory is compressed. For a file, this means that all of
the data in the file is compressed. For a directory, this means that
compression is the default for newly created files and subdirectories.</p>
</dd>
</li>
<dt><strong><a name="item_file_attribute_device"><code>FILE_ATTRIBUTE_DEVICE</code></a></strong>
<dd>
<p>Reserved; do not use.</p>
</dd>
</li>
<dt><strong><a name="item_file_attribute_directory"><code>FILE_ATTRIBUTE_DIRECTORY</code></a></strong>
<dd>
<p>The handle identifies a directory.</p>
</dd>
</li>
<dt><strong><a name="item_file_attribute_encrypted"><code>FILE_ATTRIBUTE_ENCRYPTED</code></a></strong>
<dd>
<p>The file or directory is encrypted. For a file, this means that all data
streams in the file are encrypted. For a directory, this means that
encryption is the default for newly created files and subdirectories.</p>
</dd>
</li>
<dt><strong><a name="item_file_attribute_hidden"><code>FILE_ATTRIBUTE_HIDDEN</code></a></strong>
<dd>
<p>The file or directory is hidden. It is not included in an ordinary directory
listing.</p>
</dd>
</li>
<dt><strong><a name="item_file_attribute_normal"><code>FILE_ATTRIBUTE_NORMAL</code></a></strong>
<dd>
<p>The file or directory has no other attributes set. This attribute is valid
only if used alone.</p>
</dd>
</li>
<dt><strong><a name="item_file_attribute_not_content_indexed"><code>FILE_ATTRIBUTE_NOT_CONTENT_INDEXED</code></a></strong>
<dd>
<p>The file will not be indexed by the content indexing service.</p>
</dd>
</li>
<dt><strong><a name="item_file_attribute_offline"><code>FILE_ATTRIBUTE_OFFLINE</code></a></strong>
<dd>
<p>The data of the file is not immediately available. This attribute indicates
that the file data has been physically moved to offline storage. This
attribute is used by Remote Storage, the hierarchical storage management
software. Applications should not arbitrarily change this attribute.</p>
</dd>
</li>
<dt><strong><a name="item_file_attribute_readonly"><code>FILE_ATTRIBUTE_READONLY</code></a></strong>
<dd>
<p>The file or directory is read-only. Applications can read the file but cannot
write to it or delete it. In the case of a directory, applications cannot
delete it.</p>
</dd>
</li>
<dt><strong><a name="item_file_attribute_reparse_point"><code>FILE_ATTRIBUTE_REPARSE_POINT</code></a></strong>
<dd>
<p>The file or directory has an associated reparse point.</p>
</dd>
</li>
<dt><strong><a name="item_file_attribute_sparse_file"><code>FILE_ATTRIBUTE_SPARSE_FILE</code></a></strong>
<dd>
<p>The file is a sparse file.</p>
</dd>
</li>
<dt><strong><a name="item_file_attribute_system"><code>FILE_ATTRIBUTE_SYSTEM</code></a></strong>
<dd>
<p>The file or directory is part of, or is used exclusively by, the operating
system.</p>
</dd>
</li>
<dt><strong><a name="item_file_attribute_temporary"><code>FILE_ATTRIBUTE_TEMPORARY</code></a></strong>
<dd>
<p>The file is being used for temporary storage. File systems avoid writing
data back to mass storage if sufficient cache memory is available, because
often the application deletes the temporary file shortly after the handle is
closed. In that case, the system can entirely avoid writing the data.
Otherwise, the data will be written after the handle is closed.</p>
</dd>
</li>
</dl>
<dt><strong><a name="item_getfiletype">GetFileType</a></strong>
<dt><strong><code>$uFileType= GetFileType( $hFile )</code></strong>
<dd>
<p>Takes a Win32 native file handle and returns a <code>FILE_TYPE_*</code> constant
indicating the type of the file opened on that handle:</p>
</dd>
<dl>
<dt><strong><a name="item_file_type_unknown"><code>FILE_TYPE_UNKNOWN</code></a></strong>
<dd>
<p>None of the below. Often a special device.</p>
</dd>
</li>
<dt><strong><a name="item_file_type_disk"><code>FILE_TYPE_DISK</code></a></strong>
<dd>
<p>An ordinary disk file.</p>
</dd>
</li>
<dt><strong><a name="item_file_type_char"><code>FILE_TYPE_CHAR</code></a></strong>
<dd>
<p>What Unix would call a "character special file", that is, a device that
works on character streams such as a printer port or a console.</p>
</dd>
</li>
<dt><strong><a name="item_file_type_pipe"><code>FILE_TYPE_PIPE</code></a></strong>
<dd>
<p>Either a named or anonymous pipe.</p>
</dd>
</li>
</dl>
<dt><strong><a name="item_getfilesize">getFileSize</a></strong>
<dt><strong><code>$size= getFileSize( $hFile )</code></strong>
<dd>
<p>This is a Perl-friendly wrapper for the <a href="#item_getfilesize"><code>GetFileSize</code></a> (below) API call.</p>
</dd>
<dd>
<p>It takes a Win32 native file handle and returns the size in bytes. Since the
size can be a 64 bit value, on non 64 bit integer Perls the value returned will
be an object of type <code>Math::BigInt</code>.</p>
</dd>
</li>
<dt><strong><a name="item_getfilesize">GetFileSize</a></strong>
<dt><strong><code>$iSizeLow= GetFileSize($win32Handle, $iSizeHigh)</code></strong>
<dd>
<p>Returns the size of a file pointed to by <code>$win32Handle</code>, optionally storing
the high order 32 bits into <code>$iSizeHigh</code> if it is not <code>[]</code>. If $iSizeHigh is
<code>[]</code>, a non-zero value indicates success. Otherwise, on failure the return
value will be <code>0xffffffff</code> and <a href="#item_filelasterror"><code>fileLastError()</code></a> will not be <code>NO_ERROR</code>.</p>
</dd>
</li>
<dt><strong><a name="item_getoverlappedresult">GetOverlappedResult</a></strong>
<dt><strong><code>$bRetval= GetOverlappedResult( $win32Handle, $pOverlapped,
$numBytesTransferred, $bWait )</code></strong>
<dd>
<p>Used for asynchronous IO in Win32 to get the result of a pending IO operation,
such as when a file operation returns <code>ERROR_IO_PENDING</code>. Returns a false
value on failure. The <code>$overlapped</code> structure and <code>$numBytesTransferred</code>
will be modified with the results of the operation.</p>
</dd>
<dd>
<p>As far as creating the <code>$pOverlapped</code> structure, you are currently on your own.</p>
</dd>
<dd>
<p>See <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/getoverlappedresult.asp">http://msdn.microsoft.com/library/default.asp</a> for more information.</p>
</dd>
</li>
<dt><strong><a name="item_getlogicaldrives">GetLogicalDrives</a></strong>
<dt><strong><code>$uDriveBits= GetLogicalDrives()</code></strong>
<dd>
<p>Returns an unsigned value with one bit set for each drive letter currently
defined. If "A:" is currently a valid drive letter, then the <code>1</code> bit
will be set in <code>$uDriveBits</code>. If "B:" is valid, then the <code>2</code> bit will
be set. If "Z:" is valid, then the <code>2**26</code> [<code>0x4000000</code>] bit will be
set.</p>
</dd>
</li>
<dt><strong><a name="item_getlogicaldrivestrings">GetLogicalDriveStrings</a></strong>
<dt><strong><code>$olOutLength= GetLogicalDriveStrings( $lBufSize, $osBuffer )</code></strong>
<dd>
<p>For each currently defined drive letter, a <code>'\0'</code>-terminated string
of the path to the root of its file system is constructed. All of
these strings are concatenated into a single larger string and an
extra terminating <code>'\0'</code> is added. This larger string is returned
in <code>$osBuffer</code>. Note that this includes drive letters that have
been defined but that have no file system, such as drive letters
assigned to unformatted partitions.</p>
</dd>
<dd>
<p><code>$lBufSize</code> is the size of the buffer to allocate to store this
list of strings. <code>26*4+1</code> is always sufficient and should usually
be used.</p>
</dd>
<dd>
<p><code>$osBuffer</code> is a scalar to be set to contain the constructed string.</p>
</dd>
<dd>
<p><code>$olOutLength</code> is the number of bytes actually written to <code>$osBuffer</code>
but <a href="../../lib/Pod/perlfunc.html#item_length"><code>length($osBuffer)</code></a> can also be used to determine this.</p>
</dd>
<dd>
<p>For example, on a poorly equipped computer,</p>
</dd>
<dd>
<pre>
<span class="variable">GetLogicalDriveStrings</span><span class="operator">(</span> <span class="number">4</span><span class="operator">*</span><span class="number">26</span><span class="operator">+</span><span class="number">1</span><span class="operator">,</span> <span class="variable">$osBuffer</span> <span class="operator">);</span>
</pre>
</dd>
<dd>
<p>might set <code>$osBuffer</code> to the 9-character string, <code>"A:\\\0C:\\\0\0"</code>.</p>
</dd>
</li>
<dt><strong><a name="item_gethandleinformation">GetHandleInformation</a></strong>
<dt><strong><code>GetHandleInformation( $hObject, $ouFlags )</code></strong>
<dd>
<p>Retrieves the flag
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -