Hi,

Was trying to use the GetFileAttr() function today to find out if a file has been encrypted, and I found out that there is an error in the KiXtart documentation for this function.

KiXtart 4.61 documentation states:

 Quote:
64 Encrypted The file or directory is encrypted. For a file, this means that all data streams are encrypted. For a directory, this means that encryption is the default for newly created files and subdirectories.


Whereas MSDN states ( http://msdn.microsoft.com/en-us/library/ee332330(VS.85).aspx):

 Quote:
FILE_ATTRIBUTE_ENCRYPTED 16384 0x4000 A file or directory that is encrypted. For a file, all data streams in the file are encrypted. For a directory, encryption is the default for newly created files and subdirectories.


Having tested this out in the 'real world', MSDN is correct (i.e. the function returns 16384 for a file that is 'just' encrypted). Value 64 is equivalent to FILE_ATTRIBUTE_DEVICE, which is 'reserved for system use.'

If we are updating the documentation, it might also be helpful to add in the new value 8192 in case someone wants it - according to MSDN this is defined as FILE_ATTRIBUTE_NOT_CONTENT_INDEXED, and is set when 'The file or directory is not to be indexed by the content indexing service.' There are also a couple of other 'system reserved' ones but these might not be so helpful.


Edited by Christopher Hill (2009-11-18 12:59 PM)