Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

CIM_DeviceFile class

The CIM_DeviceFile class represents a type of logical file, which represents a device. This convention is useful for operating systems that manage devices using a byte stream I/O model. The logical device that is associated with this file is specified using the CIM_DeviceAccessedByFile relationship.

Important  The DMTF (Distributed Management Task Force) CIM (Common Information Model) classes are the parent classes upon which WMI classes are built. WMI currently supports only the CIM 2.x version schemas.

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_DeviceFile : 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   Name;
  string   Path;
  boolean  Readable;
  string   Status;
  boolean  System;
  boolean  Writeable;
};

Members

The CIM_DeviceFile class has these types of members:

Methods

The CIM_DeviceFile class has these methods.

MethodDescription
ChangeSecurityPermissions

Changes the security permissions for the logical file specified in the object path. Not implemented by WMI.

ChangeSecurityPermissionsEx

Changes the security permissions for the logical file specified in the object path. Not implemented by WMI.

Compress

Compresses the logical file (or directory) specified in the object path. Not implemented by WMI.

CompressEx

Compresses the logical file (or directory) specified in the object path. Not implemented by WMI.

Copy

Copies the logical file (or directory) specified in the object path to the location specified by the input parameter. Not implemented by WMI.

CopyEx

Copies the logical file (or directory) specified in the object path to the location specified by the input parameter. Not implemented by WMI.

Delete

Deletes the logical file (or directory) specified in the object path. Not implemented by WMI.

DeleteEx

Deletes the logical file (or directory) specified in the object path. Not implemented by WMI.

GetEffectivePermission

Determines whether the caller has the aggregated permissions specified by the Permission argument. Not implemented by WMI.

Rename

Renames the logical file (or directory) specified in the object path. Not implemented by WMI.

TakeOwnerShip

Obtains ownership of the logical file specified in the object path. Not implemented by WMI.

TakeOwnerShipEx

Obtains ownership of the logical file specified in the object path. Not implemented by WMI.

Uncompress

Uncompresses the logical file (or directory) specified in the object path. Not implemented by WMI.

UncompressEx

Uncompresses the logical file (or directory) specified in the object path. Not implemented by WMI.

 

Properties

The CIM_DeviceFile class has these properties.

AccessMask
Data type: uint32
Access type: Read-only

Bit array that represents the access rights to the given file or directory held by the user or group on whose behalf the instance is returned. On FAT volumes, FULL_ACCESS is returned, which indicates that no security has been set on the object. This property is inherited from CIM_LogicalFile.

ValueMeaning
FILE_READ_DATA (file) FILE_LIST_DIRECTORY (directory)
0 (0x0)

Grants the right to read data from the file. For a directory, this value grants the right to list the contents of the directory.

FILE_WRITE_DATA (file) FILE_ADD_FILE (directory)
1 (0x1)

Grants the right to write data to the file. For a directory, this value grants the right to create a file in the directory.

FILE_APPEND_DATA (file) FILE_ADD_SUBDIRECTORY
4 (0x4)

Grants the right to append data to the file. For a directory, this value grants the right to create a subdirectory.

FILE_READ_EA
8 (0x8)

Grants the right to read extended attributes.

FILE_WRITE_EA
16 (0x10)

Grants the right to write extended attributes.

FILE_EXECUTE (file) FILE_TRAVERSE (directory)
32 (0x20)

Grants the right to execute a file. For a directory, the directory can be traversed.

FILE_DELETE_CHILD
64 (0x40)

Grants the right to delete a directory and all the files it contains (its children), even if the files are read-only.

FILE_READ_ATTRIBUTES
128 (0x80)

Grants the right to read file attributes.

FILE_WRITE_ATTRIBUTES
256 (0x100)

Grants the right to change file attributes.

DELETE
65536 (0x10000)

Grants delete access.

READ_CONTROL
131072 (0x20000)

Grants read access to the security descriptor and owner.

WRITE_DAC
262144 (0x40000)

Grants write access to the discretionary ACL.

WRITE_OWNER
524288 (0x80000)

Assigns the write owner.

SYNCHRONIZE
1048576 (0x100000)

Synchronizes access and allows a process to wait for an object to enter the signaled state.

 

Archive
Data type: boolean
Access type: Read-only

If True, the file should be 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 indicates 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 described, 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

File's creation date. 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.

Example: "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

Size of the file, 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

Descriptor that represents the file type (indicated by the Extension property). This property is inherited from CIM_LogicalFile.

FSCreationClassName
Data type: string
Access type: Read-only

Class of the file system. This property is inherited from CIM_LogicalFile.

FSName
Data type: string
Access type: Read-only

Name of the file system. 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 when the object was 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.

Name
Data type: string
Access type: Read-only

Inherited name that serves as a 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 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. Operational and nonoperational status can be defined. Operational status can include "OK", "Degraded", and "Pred Fail". "Pred Fail" indicates that an element is functioning properly, but is predicting a failure (for example, a SMART-enabled hard disk drive).

Nonoperational status can include "Error", "Starting", "Stopping", and "Service". "Service" can apply during disk mirror-resilvering, reloading a user permissions list, or other administrative work. Not all such work is online, but the managed element is neither "OK" nor in one of the other states. This property is inherited from CIM_ManagedSystemElement.

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.

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_DeviceFile class is derived from CIM_LogicalFile.

WMI does not implement this 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.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2003

Namespace

\root\CIMV2

MOF

CIMWin32.mof

DLL

CIMWin32.dll

 

 

Show:
© 2014 Microsoft