JCL Help:NtfsSetCompression
JCL Help: NtfsSetCompression Function
Search in JCL Help
Search in all projects
Summary
Sets the compression state of a file.
Pascal
function NtfsSetCompression(const FileName: TFileName; const State: Short): Boolean;
Parameters
Parameters | Description |
const FileName: TFileName | The name of the file for which you want to set the compression state. |
const State: Short | The desired compression state. Currently this can be one of the following values: * COMPRESSION_FORMAT_NONE Uncompress the file or directory. * COMPRESSION_FORMAT_LZNT1 Compress the file or directory with the LZNT1 format. * COMPRESSION_FORMAT_DEFAULT Compress the file or directory with the default format. * All other values: reserved for future use. |
Return Value
If the function succeeds in setting the compression state the result it True, otherwise it's False.
Description
NtfsSetCompression sets 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
NtfsGetCompression NtfsSetFileCompression NtfsSetDefaultFileCompression NtfsSetDirectoryTreeCompression NtfsSetPathCompression
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. Directories are not actually compressed by this operation. Rather, the operation sets the default state for files created in the directory to be compressed. To change the compression state of a directory and all of its contents, use NtfsSetDirectoryTreeCompression.
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