CIM_DataFile class
The CIM_DataFile class represents a named collection of data or executable code. Only instances of files on local fixed disks will be returned.
The following syntax is simplified from Managed Object Format (MOF) code and includes all inherited properties. Properties are listed in alphabetic order, not MOF order.
Syntax
class CIM_DataFile : CIM_LogicalFile
{
uint32 AccessMask;
boolean Archive;
string Caption;
boolean Compressed;
string CompressionMethod;
string CreationClassName;
datetime CreationDate;
string CSCreationClassName;
string CSName;
string Description;
string Drive;
string EightDotThreeFileName;
boolean Encrypted;
string EncryptionMethod;
string Extension;
string FileName;
uint64 FileSize;
string FileType;
string FSCreationClassName;
string FSName;
boolean Hidden;
datetime InstallDate;
uint64 InUseCount;
datetime LastAccessed;
datetime LastModified;
string Manufacturer;
string Name;
string Path;
boolean Readable;
string Status;
boolean System;
string Version;
boolean Writeable;
};
Members
The CIM_DataFile class has these types of members:
Methods
The CIM_DataFile class has these methods.
| Method | Description |
|---|---|
| ChangeSecurityPermissions |
Changes the security permissions for the logical file specified in the object path. Implemented by WMI. |
| ChangeSecurityPermissionsEx |
Changes the security permissions for the logical file specified in the object path. Implemented by WMI. |
| Compress |
Uses NTFS compression to compress the logical file (or directory) specified in the object path. Implemented by WMI. |
| CompressEx |
Compresses the logical file (or directory) specified in the object path. Implemented by WMI. |
| Copy |
Copies the logical file (or directory) specified in the object path to the location specified by the input parameter. Implemented by WMI. |
| CopyEx |
Copies the logical file (or directory) specified in the object path to the location specified by the input parameter. Implemented by WMI. |
| Delete |
Deletes the logical file (or directory) specified in the object path. Implemented by WMI. |
| DeleteEx |
Deletes the logical file (or directory) specified in the object path. Implemented by WMI. |
| GetEffectivePermission |
Determines whether the caller has the aggregated permissions specified by the Permission argument. Implemented by WMI. |
| Rename |
Renames the logical file (or directory) specified in the object path. Implemented by WMI. |
| TakeOwnerShip |
Obtains ownership of the logical file specified in the object path. Implemented by WMI. |
| TakeOwnerShipEx |
Obtains ownership of the logical file specified in the object path. Implemented by WMI. |
| Uncompress |
Uncompresses the logical file (or directory) specified in the object path. Implemented by WMI. |
| UncompressEx |
Uncompresses the logical file (or directory) specified in the object path. Implemented by WMI. |
Properties
The CIM_DataFile class has these properties.
- AccessMask
-
- Data type: uint32
- Access type: Read-only
Bitmask that represents the access rights required to access or perform specific operations on the file. For values, see File and Directory Access Rights Constants.
Windows 2000: On FAT volumes, the FULL_ACCESS value is returned instead, which indicates no security has been set on the object. - Archive
-
- Data type: boolean
- Access type: Read-only
If True, the file is archived. This property is inherited from CIM_LogicalFile.
- Caption
-
- Data type: string
- Access type: Read-only
Short textual description of the object. This property is inherited from CIM_ManagedSystemElement.
- Compressed
-
- Data type: boolean
- Access type: Read-only
If True, the file is compressed. This property is inherited from CIM_LogicalFile.
- CompressionMethod
-
- Data type: string
- Access type: Read-only
Free-form string that identifies the algorithm or tool used to compress the logical file. If the compression scheme is unknown or not described, use "Unknown". If the logical file is compressed, but the compression scheme is unknown or not disclosed, use "Compressed". If the logical file is not compressed, use "Not Compressed". This property is inherited from CIM_LogicalFile.
- CreationClassName
-
- Data type: string
- Access type: Read-only
Name of the class. This property is inherited from CIM_LogicalFile.
- CreationDate
-
- Data type: datetime
- Access type: Read-only
Date when the file was created. This property is inherited from CIM_LogicalFile.
- CSCreationClassName
-
- Data type: string
- Access type: Read-only
Class of the computer system. This property is inherited from CIM_LogicalFile.
- CSName
-
- Data type: string
- Access type: Read-only
Name of the computer system. This property is inherited from CIM_LogicalFile.
- Description
-
- Data type: string
- Access type: Read-only
Textual description of the object. This property is inherited from CIM_ManagedSystemElement.
- Drive
-
- Data type: string
- Access type: Read-only
Drive letter (including the colon that follows the drive letter) of the file. This property is inherited from CIM_LogicalFile.
Example: "c:"
- EightDotThreeFileName
-
- Data type: string
- Access type: Read-only
DOS-compatible file name for the file. This property is inherited from CIM_LogicalFile.
Example: "c:\progra~1"
- Encrypted
-
- Data type: boolean
- Access type: Read-only
If True, the file is encrypted. This property is inherited from CIM_LogicalFile.
- EncryptionMethod
-
- Data type: string
- Access type: Read-only
Free-form string that identifies the algorithm or tool used to encrypt a logical file. If the encryption scheme is not indulged (for security reasons, for example), use "Unknown". If the file is encrypted, but either its encryption scheme is unknown or not disclosed, use "Encrypted". If the logical file is not encrypted, use "Not Encrypted". This property is inherited from CIM_LogicalFile.
- Extension
-
- Data type: string
- Access type: Read-only
File name extension without the preceding period (dot). This property is inherited from CIM_LogicalFile.
Examples: "txt", "mof", "mdb"
- FileName
-
- Data type: string
- Access type: Read-only
File name without the file name extension. This property is inherited from CIM_LogicalFile.
Example: "MyDataFile"
- FileSize
-
- Data type: uint64
- Access type: Read-only
File size, in bytes. This property is inherited from CIM_LogicalFile.
For more information about using uint64 values in scripts, see Scripting in WMI.
- FileType
-
- Data type: string
- Access type: Read-only
File type using the Extension property. This property is inherited from CIM_LogicalFile.
- FSCreationClassName
-
- Data type: string
- Access type: Read-only
File system class. This property is inherited from CIM_LogicalFile.
- FSName
-
- Data type: string
- Access type: Read-only
File system name. This property is inherited from CIM_LogicalFile.
- Hidden
-
- Data type: boolean
- Access type: Read-only
If True, the file is hidden. This property is inherited from CIM_LogicalFile.
- InstallDate
-
- Data type: datetime
- Access type: Read-only
Date and time the object is installed. This property does not need a value to indicate that the object is installed. This property is inherited from CIM_ManagedSystemElement.
- InUseCount
-
- Data type: uint64
- Access type: Read-only
Number of "file opens" that are currently active against the file. This property is inherited from CIM_LogicalFile.
For more information about using uint64 values in scripts, see Scripting in WMI.
- LastAccessed
-
- Data type: datetime
- Access type: Read-only
Date and time that the file was last accessed. This property is inherited from CIM_LogicalFile.
- LastModified
-
- Data type: datetime
- Access type: Read-only
Date and time that the file was last modified. This property is inherited from CIM_LogicalFile.
- Manufacturer
-
- Data type: string
- Access type: Read-only
Manufacturer string from the version resource (if one is present).
- Name
-
- Data type: string
- Access type: Read-only
Inherited name that is the key of a logical file instance within a file system (provide full path names). This property is inherited from CIM_ManagedSystemElement.
Example: "c:\winnt\system\win.ini"
- Path
-
- Data type: string
- Access type: Read-only
Path of the file including the leading and trailing backslashes. This property is inherited from CIM_LogicalFile.
Example: "\windows\system\"
- Readable
-
- Data type: boolean
- Access type: Read-only
If True, the file can be read. This property is inherited from CIM_LogicalFile.
- Status
-
- Data type: string
- Access type: Read-only
String that indicates the current status of the object.
Values include the following:
- "OK"
- "Error"
- "Degraded"
- "Unknown"
- "Pred Fail"
- "Starting"
- "Stopping"
- "Service"
- "Stressed"
- "NonRecover"
- "No Contact"
- "Lost Comm"
- System
-
- Data type: boolean
- Access type: Read-only
If True, the file is a system file. This property is inherited from CIM_LogicalFile.
- Version
-
- Data type: string
- Access type: Read-only
Version string from the version resource (if one is present).
- Writeable
-
- Data type: boolean
- Access type: Read-only
If True, the file can be written. This property is inherited from CIM_LogicalFile.
Remarks
The CIM_DataFile class is derived from CIM_LogicalFile.
WMI implements the CIM_DataFile class and all of its methods. The CIM_DataFile class is a dynamic class.
This documentation is derived from the CIM class descriptions published by the DMTF. Microsoft may have made changes to correct minor errors, conform to Microsoft SDK documentation standards, or provide more information.
Examples
For script code examples, see WMI Tasks for Scripts and Applications and the TechNet ScriptCenter Script Repository.
For C++ code examples, see WMI C++ Application Examples.
Requirements
|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
|---|---|
|
Minimum supported server | Windows 2000 Server [desktop apps only] |
|
Namespace |
\root\CIMV2 |
|
MOF |
|
|
DLL |
|
Send comments about this topic to Microsoft
Build date: 11/19/2012