JCL Help:NtfsGetCompression@TFileName
JCL Help: NtfsGetCompression Function
Search in JCL Help
Search in all projects
Summary
Obtains the compression state of a file.
Pascal
function NtfsGetCompression(const FileName: TFileName; out State: Short): Boolean; overload;
function NtfsGetCompression(const FileName: TFileName): TFileCompressionState; overload;
Parameters
Parameters | Description |
const FileName: TFileName | The name of the file you want to test. |
out State: Short | Variable that receives the compression state of the specified file. Currently this can be one of the following values: * COMPRESSION_FORMAT_NONE The file is not compressed. * COMPRESSION_FORMAT_LZNT1 The file is compressed with the LZNT1 format * All other values: Reserved for future use. |
Return Value
If the function succeeds in retrieving the compression state the result is True, otherwise it's False. In the latter case the content of the State parameter is undefined upon return. The second variant of NtfsGetCompression returns the compression state of the specified file; in case of failure an exception is raised.
Description
NtfsGetCompression returns the compression state of the specified file or directory. The underlying filesystem must support per stream compression or this function will fail. Currently only LZNT1 is supported as the compression format but this may change in future releases of the Windows operating system.
See Also
TFileCompressionState NtfsSetCompression
About
Unit
Donator
Marcel van Brakel
Notes
The underlying filesystem must support per stream compression. Currently that means the specified file or directory must reside on an NTFS formatted partition. The FAT filesystem does not support compression.
Contribute to this help topic
This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page