CIM_Directory class

The CIM_Directory class represents a file type that logically groups the data files that it contains and provides path information for the grouped files.

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

[Abstract, UUID("{8502C55F-5FBB-11D2-AAC1-006008C78BC7}"), DisplayName("Directories (CIM)"), AMENDMENT]
class CIM_Directory : 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_Directory class has these types of members:

Methods

The CIM_Directory class has these methods.

Method Description
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_Directory class has these properties.

AccessMask

Data type: uint32

Access type: Read-only

Qualifiers: Schema ("Win32"), DisplayName ("Access Rights")

Bitmask that represents the access rights required to access or perform specific operations on the directory. For values, see File and Directory Access Rights Constants.

Note

On FAT volumes, the FULL_ACCESS value is returned instead, which indicates no security has been set on the object.

This property is inherited from CIM_LogicalFile.

FILE_READ_DATA (file) or FILE_LIST_DIRECTORY (directory) (1)

FILE_WRITE_DATA (file) or FILE_ADD_FILE (directory) (2)

FILE_APPEND_DATA (file) or FILE_ADD_SUBDIRECTORY (directory) (4)

FILE_READ_EA (8)

FILE_WRITE_EA (16)

FILE_EXECUTE (file) or FILE_TRAVERSE (directory) (32)

FILE_DELETE_CHILD (directory) (64)

FILE_READ_ATTRIBUTES (128)

FILE_WRITE_ATTRIBUTES (256)

DELETE (65536)

READ_CONTROL (131072)

WRITE_DAC (262144)

WRITE_OWNER (524288)

SYNCHRONIZE (1048576)

Archive

Data type: boolean

Access type: Read-only

Qualifiers: Schema ("Win32"), DisplayName ("Should Be Archived")

If True, the file should be archived.

This property is inherited from CIM_LogicalFile.

Caption

Data type: string

Access type: Read-only

Qualifiers: MaxLen (64), DisplayName ("Caption")

Short textual description of the object.

This property is inherited from CIM_ManagedSystemElement.

Compressed

Data type: boolean

Access type: Read-only

Qualifiers: Schema ("Win32"), DisplayName ("Compressed")

If True, the file is compressed.

This property is inherited from CIM_LogicalFile.

CompressionMethod

Data type: string

Access type: Read-only

Qualifiers: DisplayName ("Compression Method")

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

Qualifiers: CIM_Key, DisplayName ("Class Name")

Name of the class.

This property is inherited from CIM_LogicalFile.

CreationDate

Data type: datetime

Access type: Read-only

Qualifiers: DisplayName ("Creation Date")

Date and time that the file was created.

This property is inherited from CIM_LogicalFile.

CSCreationClassName

Data type: string

Access type: Read-only

Qualifiers: Propagated ("CIM_FileSystem.CSCreationClassName"), CIM_Key, DisplayName ("Computer System Class Name")

Class of the computer system.

This property is inherited from CIM_LogicalFile.

CSName

Data type: string

Access type: Read-only

Qualifiers: Propagated ("CIM_FileSystem.CSName"), CIM_Key, DisplayName ("Computer System Name")

Name of the computer system.

This property is inherited from CIM_LogicalFile.

Description

Data type: string

Access type: Read-only

Qualifiers: DisplayName ("Description")

Textual description of the object.

This property is inherited from CIM_ManagedSystemElement.

Drive

Data type: string

Access type: Read-only

Qualifiers: Fixed, Schema ("Win32"), DisplayName ("Drive")

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

Qualifiers: Schema ("Win32"), DisplayName ("Eight Dot Three File Name")

DOS-compatible file name. This property is inherited from CIM_LogicalFile.

Example: "c:\progra~1"

Encrypted

Data type: boolean

Access type: Read-only

Qualifiers: Schema ("Win32"), DisplayName ("Encrypted")

If True, the file is encrypted.

This property is inherited from CIM_LogicalFile.

EncryptionMethod

Data type: string

Access type: Read-only

Qualifiers: DisplayName ("Encryption Method")

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

Qualifiers: Fixed, Schema ("Win32"), DisplayName ("File Extension")

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

Qualifiers: Fixed, Schema ("Win32"), DisplayName ("File Name")

File name without the file name extension.

This property is inherited from CIM_LogicalFile.

Example: "MyDataFile"

FileSize

Data type: uint64

Access type: Read-only

Qualifiers: DisplayName ("Size"), Units ("bytes")

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

Qualifiers: Schema ("Win32"), DisplayName ("File Type")

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

Qualifiers: Propagated ("CIM_FileSystem.CreationClassName"), CIM_Key, DisplayName ("File System Class Name")

Class of the file system.

This property is inherited from CIM_LogicalFile.

FSName

Data type: string

Access type: Read-only

Qualifiers: Propagated ("CIM_FileSystem.Name"), CIM_Key, DisplayName ("File System Name")

Name of the file system.

This property is inherited from CIM_LogicalFile.

Hidden

Data type: boolean

Access type: Read-only

Qualifiers: Schema ("Win32"), DisplayName ("Hidden")

If True, the file is hidden.

This property is inherited from CIM_LogicalFile.

InstallDate

Data type: datetime

Access type: Read-only

Qualifiers: MappingStrings ("MIF.DMTF|ComponentID|001.5"), DisplayName ("Install Date")

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

Qualifiers: DisplayName ("Current File Open Count")

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

Qualifiers: DisplayName ("Last Accessed")

Date and time that the file was last accessed.

This property is inherited from CIM_LogicalFile.

LastModified

Data type: datetime

Access type: Read-only

Qualifiers: DisplayName ("Last Modified")

Date and time that the file was last modified.

This property is inherited from CIM_LogicalFile.

Name

Data type: string

Access type: Read-only

Qualifiers: Key

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:\Windows\system\win.ini"

Path

Data type: string

Access type: Read-only

Qualifiers: Fixed, Schema ("Win32"), DisplayName ("Path")

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

Qualifiers: DisplayName ("Readable")

If True, the file can be read.

This property is inherited from CIM_LogicalFile.

Status

Data type: string

Access type: Read-only

Qualifiers: MaxLen (10), DisplayName ("Status")

String that indicates the current status of the object.

This property is inherited from CIM_ManagedSystemElement.

Values include the following:

OK ("OK")

Error ("Error")

Degraded ("Degraded")

Unknown ("Unknown")

Pred Fail ("Pred Fail")

Starting ("Starting")

Stopping ("Stopping")

Service ("Service")

Stressed ("Stressed")

NonRecover ("NonRecover")

No Contact ("No Contact")

Lost Comm ("Lost Comm")

System

Data type: boolean

Access type: Read-only

Qualifiers: Schema ("Win32"), DisplayName ("System File")

If True, the file is a system file.

This property is inherited from CIM_LogicalFile.

Writeable

Data type: boolean

Access type: Read-only

Qualifiers: DisplayName ("Writeable")

If True, the file can be written.

This property is inherited from CIM_LogicalFile.

Remarks

The CIM_Directory class is derived from CIM_LogicalFile.

WMI does not implement this class. For more information about classes derived from CIM_Directory, see Win32 Classes.

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 2008
Namespace
Root\CIMV2
MOF
CIMWin32.mof
DLL
CIMWin32.dll

See also

CIM_LogicalFile