JCL Help:NtfsSetFileCompression

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Sets the compression state of a file.


Pascal

 procedure NtfsSetFileCompression(const FileName: TFileName; const State: TFileCompressionState);


Parameters

Parameters Description
const FileName: TFileName The name of the file for which you want to set the compression state.
const State: TFileCompressionState The desired compression state.


Description

NtfsSetDirectoryTreeCompression sets the compression state of the specified file. 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 NtfsSetDefaultFileCompression NtfsSetDirectoryTreeCompression NtfsSetPathCompression NtfsGetCompression


About

Unit

JclNTFS


Donator

Robert Rossmair


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. NtfsSetFileCompression will raise an EJclInvalidArgument exception if the 'FileName' parameter denotes a directory. To change the compression state of a directory, 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