请问,如何用程序代码判断NTFS磁盘是否压缩?

bizhan 2008-04-15 12:35:52
请问,如何用程序判断NTFS区盘是否已经被压缩?

比如C盘或者D盘,如何判断它已经被压缩或者未被压缩?

谢谢大家!

...全文
64 点赞 收藏 5
写回复
5 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
:D
我看到压缩就帖上来了。应该是最后一个
回复
bizhan 2008-04-15
汗,应该是最后那个才对
FS_VOL_IS_COMPRESSED The specified volume is a compressed volume; for example, a DoubleSpace volume.
回复
bizhan 2008-04-15
akirya,您好,谢谢回答。

FS_FILE_COMPRESSION The file system supports file-based compression.

这个是表示该文件系统支持压缩,还是表明该文件系统已经被压缩?我需要是判断后者
回复

BOOL GetVolumeInformation(
LPCTSTR lpRootPathName,
LPTSTR lpVolumeNameBuffer,
DWORD nVolumeNameSize,
LPDWORD lpVolumeSerialNumber,
LPDWORD lpMaximumComponentLength,
LPDWORD lpFileSystemFlags,
LPTSTR lpFileSystemNameBuffer,
DWORD nFileSystemNameSize
);



lpFileSystemFlags
[out] A pointer to a variable that receives flags associated with the specified file system.
This parameter can be one or more of the following flags; however, FS_FILE_COMPRESSION and FS_VOL_IS_COMPRESSED are mutually exclusive.

Value Meaning
FILE_NAMED_STREAMS The file system supports named streams.
FILE_READ_ONLY_VOLUME The specified volume is read-only.
Windows 2000/NT and Windows Me/98/95: This value is not supported.
FILE_SUPPORTS_OBJECT_IDS The file system supports object identifiers.
FILE_SUPPORTS_REPARSE_POINTS The file system supports re-parse points.
FILE_SUPPORTS_SPARSE_FILES The file system supports sparse files.
FILE_VOLUME_QUOTAS The file system supports disk quotas.
FS_CASE_IS_PRESERVED The file system preserves the case of file names when it places a name on disk.
FS_CASE_SENSITIVE The file system supports case-sensitive file names.
FS_FILE_COMPRESSION The file system supports file-based compression.
FS_FILE_ENCRYPTION The file system supports the Encrypted File System (EFS).
FS_PERSISTENT_ACLS The file system preserves and enforces access control lists (ACL). For example, the NTFS file system preserves and enforces ACLs, and the FAT file system does not.
FS_UNICODE_STORED_ON_DISK The file system supports Unicode in file names as they appear on disk.
FS_VOL_IS_COMPRESSED The specified volume is a compressed volume; for example, a DoubleSpace volume.
回复
scq2099yt 2008-04-15
up
回复
相关推荐
发帖
VC/MFC
创建于2007-09-28

1.5w+

社区成员

VC/MFC相关问题讨论
申请成为版主
帖子事件
创建了帖子
2008-04-15 12:35
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……