Class: WMI::Win32_LogicalDisk

Inherits:
Base
  • Object
show all
Defined in:
lib/Win32_LogicalDisk.rb

Overview

Win32_LogicalDisk クラスは、Win32 システム上の実際のローカル記憶域デバイスに解決するデータ ソースを表します。 クラスはローカルとマップされた論理ディスクの両方を返します。ただし、ローカル ディスクの情報取得にはこのクラス、マップされた論理ディスクの情報取得には Win32_MappedLogicalDisk を使用する対処法が推奨されています。

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Methods inherited from Base

#AddRef, #AssociatorsAsync_, #Associators_, #Clone_, #CompareTo_, #DeleteAsync_, #Delete_, #Derivation_, #ExecMethodAsync_, #ExecMethod_, #GetIDsOfNames, #GetObjectText_, #GetText_, #GetTypeInfo, #GetTypeInfoCount, #InstancesAsync_, #Instances_, #Invoke, #Methods_, #Path_, #Properties_, #PutAsync_, #Put_, #Qualifiers_, #QueryInterface, #ReferencesAsync_, #References_, #Refresh_, #Release, #Security_, #SetFromText_, #SpawnDerivedClass_, #SpawnInstance_, #SubclassesAsync_, #Subclasses_, #SystemProperties_

Instance Attribute Details

- (uint16) Access (readonly)

Access はメディアが読み取り可能 (値 = 1) かどうか、書き込み可能 (値 = 2) かどうか、またはその両方 (値 = 3) かどうかを説明します。

 "不明" (0) 

Returns:

  • (uint16)

    Access



82
83
84
# File 'lib/Win32_LogicalDisk.rb', line 82

def Access
  @Access
end

- (uint16) Availability (readonly)

デバイスの利用可能性と状態です。

 

Returns:

  • (uint16)

    Availability



92
93
94
# File 'lib/Win32_LogicalDisk.rb', line 92

def Availability
  @Availability
end

- (uint64) BlockSize (readonly)

この StorageExtent を形成するブロックのサイズ (バイト) です。

 

Returns:

  • (uint64)

    BlockSize



99
100
101
# File 'lib/Win32_LogicalDisk.rb', line 99

def BlockSize
  @BlockSize
end

- (string) Caption (readonly)

Caption プロパティは、オブジェクトについての簡単な説明 (1 行分の文字列) です。

Returns:

  • (string)

    Caption



104
105
106
# File 'lib/Win32_LogicalDisk.rb', line 104

def Caption
  @Caption
end

- (boolean) Compressed (readonly)

Compressed プロパティは、論理ボリュームが DoubleSpace ボリュームのように単一の圧縮エンティティとして存在するかどうかを表します。

   

Returns:

  • (boolean)

    Compressed



110
111
112
# File 'lib/Win32_LogicalDisk.rb', line 110

def Compressed
  @Compressed
end

- (uint32) ConfigManagerErrorCode (readonly)

Win32 構成マネージャのエラー コードを示します。

 

Returns:

  • (uint32)

    ConfigManagerErrorCode



183
184
185
# File 'lib/Win32_LogicalDisk.rb', line 183

def ConfigManagerErrorCode
  @ConfigManagerErrorCode
end

- (boolean) ConfigManagerUserConfig (readonly)

デバイスがユーザー定義の構成を使用しているかどうかを示します。

Returns:

  • (boolean)

    ConfigManagerUserConfig



188
189
190
# File 'lib/Win32_LogicalDisk.rb', line 188

def ConfigManagerUserConfig
  @ConfigManagerUserConfig
end

- (string) CreationClassName (readonly)

CreationClassName は、インスタンスの作成で使用されるクラス名、またはサブクラス名を示します。

 

Returns:

  • (string)

    CreationClassName



194
195
196
# File 'lib/Win32_LogicalDisk.rb', line 194

def CreationClassName
  @CreationClassName
end

- (string) Description (readonly)

Description プロパティでオブジェクトの説明が提供されます。

Returns:

  • (string)

    Description



200
201
202
# File 'lib/Win32_LogicalDisk.rb', line 200

def Description
  @Description
end

- (string) DeviceID (readonly)

DeviceID プロパティには、論理ディスクをシステム上のほかのデバイスと一意に識別する文字列が含まれています。

Returns:

  • (string)

    DeviceID



205
206
207
# File 'lib/Win32_LogicalDisk.rb', line 205

def DeviceID
  @DeviceID
end

- (uint32) DriveType (readonly)

DriveType プロパティには、この論理ディスクが示すディスク ドライブの種類に対応する数値が含まれています。

 

Returns:

  • (uint32)

    DriveType



213
214
215
# File 'lib/Win32_LogicalDisk.rb', line 213

def DriveType
  @DriveType
end

- (boolean) ErrorCleared (readonly)

ErrorCleared は LastErrorCode プロパティで報告されたエラーが現在は消去されていることを示すブール値のプロパティです。

Returns:

  • (boolean)

    ErrorCleared



218
219
220
# File 'lib/Win32_LogicalDisk.rb', line 218

def ErrorCleared
  @ErrorCleared
end

- (string) ErrorDescription (readonly)

ErrorDescription は LastErrorCode プロパティで記録されたエラーに関する情報および実行される可能性がある修正の情報を提供する自由形式の文字列です。

Returns:

  • (string)

    ErrorDescription



223
224
225
# File 'lib/Win32_LogicalDisk.rb', line 223

def ErrorDescription
  @ErrorDescription
end

- (string) ErrorMethodology (readonly)

ErrorMethodology は、この拡張記憶域でサポートされているエラー検出およびエラー修正の種類を説明する自由形式の文字列です。

Returns:

  • (string)

    ErrorMethodology



228
229
230
# File 'lib/Win32_LogicalDisk.rb', line 228

def ErrorMethodology
  @ErrorMethodology
end

- (string) FileSystem (readonly)

FileSystem プロパティは、論理ディスク上のファイル システムを示します。

 

Returns:

  • (string)

    FileSystem



235
236
237
# File 'lib/Win32_LogicalDisk.rb', line 235

def FileSystem
  @FileSystem
end

- (uint64) FreeSpace (readonly)

FreeSpace プロパティによって、論理ディスクにいくらの利用可能な空領域があるかバイト数で示されます。

Returns:

  • (uint64)

    FreeSpace



240
241
242
# File 'lib/Win32_LogicalDisk.rb', line 240

def FreeSpace
  @FreeSpace
end

- (datetime) InstallDate (readonly)

InstallDate プロパティは、オブジェクトがインストールされた日時を示す値です。

 

Returns:

  • (datetime)

    InstallDate



246
247
248
# File 'lib/Win32_LogicalDisk.rb', line 246

def InstallDate
  @InstallDate
end

- (uint32) LastErrorCode (readonly)

論理デバイスで報告されたエラー コードが LastErrorCode によってキャプチャされます。

Returns:

  • (uint32)

    LastErrorCode



251
252
253
# File 'lib/Win32_LogicalDisk.rb', line 251

def LastErrorCode
  @LastErrorCode
end

- (uint32) MaximumComponentLength (readonly)

MaximumComponentLength プロパティには、Win32 ドライブによってサポートされるコンポーネントの最長ファイル名の制限が含まれています。

 

Returns:

  • (uint32)

    MaximumComponentLength



263
264
265
# File 'lib/Win32_LogicalDisk.rb', line 263

def MaximumComponentLength
  @MaximumComponentLength
end

- (uint32) MediaType (readonly)

MediaType プロパティは、論理ドライブに現在あるメディアの種類を示します。

 

Returns:

  • (uint32)

    MediaType



271
272
273
# File 'lib/Win32_LogicalDisk.rb', line 271

def MediaType
  @MediaType
end

- (string) Name (readonly)

Name プロパティで、オブジェクトを認識するラベルを定義します。

 

Returns:

  • (string)

    Name



277
278
279
# File 'lib/Win32_LogicalDisk.rb', line 277

def Name
  @Name
end

- (string) PNPDeviceID (readonly)

論理デバイスの Win32 プラグ アンド プレイ デバイス ID を示します。

 

Returns:

  • (string)

    PNPDeviceID



290
291
292
# File 'lib/Win32_LogicalDisk.rb', line 290

def PNPDeviceID
  @PNPDeviceID
end

- (uint16) PowerManagementCapabilities (readonly)

論理デバイスの特定の電源関連機能を示します。

 0="不明"

Returns:

  • (uint16)

    PowerManagementCapabilities



301
302
303
# File 'lib/Win32_LogicalDisk.rb', line 301

def PowerManagementCapabilities
  @PowerManagementCapabilities
end

- (boolean) PowerManagementSupported (readonly)

デバイスを電源管理できることを示すブール値です - 例、省電力状態にする。

 

Returns:

  • (boolean)

    PowerManagementSupported



309
310
311
# File 'lib/Win32_LogicalDisk.rb', line 309

def PowerManagementSupported
  @PowerManagementSupported
end

- (string) ProviderName (readonly)

ProviderName プロパティは、論理デバイスへのネットワーク パス名を示します。

Returns:

  • (string)

    ProviderName



314
315
316
# File 'lib/Win32_LogicalDisk.rb', line 314

def ProviderName
  @ProviderName
end

- (string) Purpose (readonly)

メディアおよび (または) その使用を説明する自由形式の文字列です。

Returns:

  • (string)

    Purpose



319
320
321
# File 'lib/Win32_LogicalDisk.rb', line 319

def Purpose
  @Purpose
end

- (boolean) QuotasDisabled

QuotasDisabled プロパティにより、このボリュームでクォータ管理が有効ではないことが示されます。

Returns:

  • (boolean)

    QuotasDisabled



324
325
326
# File 'lib/Win32_LogicalDisk.rb', line 324

def QuotasDisabled
  @QuotasDisabled
end

- (boolean) QuotasIncomplete (readonly)

QuotasIncomplete プロパティにより、クォータ管理が使用されたが無効になっていることが示されます。

 

Returns:

  • (boolean)

    QuotasIncomplete



330
331
332
# File 'lib/Win32_LogicalDisk.rb', line 330

def QuotasIncomplete
  @QuotasIncomplete
end

- (boolean) QuotasRebuilding (readonly)

QuotasRebuilding プロパティにより、アクティブ状態がファイル システムが情報のコンパイルを実行して、クォータ管理のディスクを設定していることを意味していることが示されます。

Returns:

  • (boolean)

    QuotasRebuilding



335
336
337
# File 'lib/Win32_LogicalDisk.rb', line 335

def QuotasRebuilding
  @QuotasRebuilding
end

- (uint64) Size (readonly)

Size プロパティは論理ドライブのサイズを示します (バイト)。

Returns:

  • (uint64)

    Size



340
341
342
# File 'lib/Win32_LogicalDisk.rb', line 340

def Size
  @Size
end

- (string) Status (readonly)

Status プロパティはオブジェクトの現在の状態を示す文字列です。

 

Returns:

  • (string)

    Status



353
354
355
# File 'lib/Win32_LogicalDisk.rb', line 353

def Status
  @Status
end

- (uint16) StatusInfo (readonly)

StatusInfo は、論理デバイスが有効 (値 = 3)、無効 (値 = 4) またはその他 (1) または不明 (2) 状態であるかどうかを示す文字列です。

 

Returns:

  • (uint16)

    StatusInfo



359
360
361
# File 'lib/Win32_LogicalDisk.rb', line 359

def StatusInfo
  @StatusInfo
end

- (boolean) SupportsDiskQuotas (readonly)

SupportsDiskQuotas プロパティにより、このボリュームがディスク クォータをサポートするかどうか示されます

Returns:

  • (boolean)

    SupportsDiskQuotas



364
365
366
# File 'lib/Win32_LogicalDisk.rb', line 364

def SupportsDiskQuotas
  @SupportsDiskQuotas
end

- (boolean) SupportsFileBasedCompression (readonly)

SupportsFileBasedCompression プロパティは、論理ディスク パーティションが NTFS のようなファイル ベースの圧縮をサポートするかどうかを示します。

 

Returns:

  • (boolean)

    SupportsFileBasedCompression



373
374
375
# File 'lib/Win32_LogicalDisk.rb', line 373

def SupportsFileBasedCompression
  @SupportsFileBasedCompression
end

- (string) SystemCreationClassName (readonly)

スコーピング システムの CreationClassName です。

Returns:

  • (string)

    SystemCreationClassName



379
380
381
# File 'lib/Win32_LogicalDisk.rb', line 379

def SystemCreationClassName
  @SystemCreationClassName
end

- (string) SystemName (readonly)

スコーピング システムの名前です。

Returns:

  • (string)

    SystemName



384
385
386
# File 'lib/Win32_LogicalDisk.rb', line 384

def SystemName
  @SystemName
end

- (boolean) VolumeDirty (readonly)

VolumeDirty プロパティにより、次回の起動時にディスクが chkdsk の実行を要求するかどうか示されます。

 

Returns:

  • (boolean)

    VolumeDirty



391
392
393
# File 'lib/Win32_LogicalDisk.rb', line 391

def VolumeDirty
  @VolumeDirty
end

- (string) VolumeName

VolumeName プロパティは、論理ディスクのボリューム名を示します。

 

Returns:

  • (string)

    VolumeName



398
399
400
# File 'lib/Win32_LogicalDisk.rb', line 398

def VolumeName
  @VolumeName
end

- (string) VolumeSerialNumber (readonly)

VolumeSerialNumber プロパティは、論理ディスクのボリューム シリアル番号を示します。

 

Returns:

  • (string)

    VolumeSerialNumber



406
407
408
# File 'lib/Win32_LogicalDisk.rb', line 406

def VolumeSerialNumber
  @VolumeSerialNumber
end

Instance Method Details

- (uint32) Chkdsk(FixErrors, ForceDismount, OkToRunAtBootUp, RecoverBadSectors, SkipFolderCycle, VigorousIndexCheck)

このメソッドにより、ディスクの chkdsk オペレーションが呼び出されます。

 

割り当てずみ論理ドライブには適用できません。

 

Parameters:

  • (boolean, #read) FixErrors

    このパラメータにより、ディスクで見つけられたエラーをどうするべきかが示されます。 TURE の場合は、エラーは修正されます。

  • (boolean, #read) ForceDismount

    このパラメータにより、チェックの前にドライブにマウントの解除を強制するかどうかが示されます。

  • (boolean, #read) OkToRunAtBootUp

    このパラメータにより、メソッドが呼び出されたときにディスクがロックされたためにオペレーションが実行できなかった場合に、次回の起動時に chkdsk オペレーションを実行するべきかどうかが示されます。

  • (boolean, #read) RecoverBadSectors

    このパレメータにより、不良セクタを見つけて、読み取り可能な情報をこれらのセクタから回復させるべきかどうかが示されます。

  • (boolean, #read) SkipFolderCycle

    このパラメータにより、フォルダ サイクルのチェックをスキップするべきかどうかが示されます。

  • (boolean, #read) VigorousIndexCheck

    このパラメータにより、インデックス エントリを活発に実行するべきかどうかが示されます。

Returns:

  • (uint32)


48
49
# File 'lib/Win32_LogicalDisk.rb', line 48

def Chkdsk FixErrors, ForceDismount, OkToRunAtBootUp, RecoverBadSectors, SkipFolderCycle, VigorousIndexCheck
end

- (uint32) ExcludeFromAutochk(LogicalDisk)

このメソッドは次回の再起動の chkdsk 操作から除外するディスクに使用されます。 除外されなかった場合、不良ビットがディスクに設定されていれば chkdsk はディスクで実行されます。 除外するディスクへの呼び出しは累積ではありません。 除外されたいくつかのディスクに呼び出しがあった場合、既に除外とマークされた一覧に新しい一覧を追加する代わりに、新しい一覧が以前の一覧に上書きされます。 そのメソッドはコンピュータの物理ディスクを表す論理ディスクのそれらのインスタンスにのみ適用可能で、マップされた論理ドライブには適用できません。

たとえば、有効なドライブの仕様は "C:"、"d:"、"G:" になります。 ドライブ文字とコロンが必要なことに注意してください。

Parameters:

  • (string, #read) LogicalDisk

    このバラメータは、次回の再起動時に autochk から除去されるべきドライブの一覧を指定するのに使用されます。 文字列の構文は論理ディスクのコロンが後についたドライブ文字を含みます。

Returns:

  • (uint32)


75
76
# File 'lib/Win32_LogicalDisk.rb', line 75

def ExcludeFromAutochk LogicalDisk
end

- (uint32) Reset

論理デバイスのリセットを要求します。 要求が正常に実行された場合、返される値は 0 で、要求がサポートされない場合は 1 です。 また、エラーが発生した場合は、ほかの値となります。

Returns:

  • (uint32)


26
27
# File 'lib/Win32_LogicalDisk.rb', line 26

def Reset 
end

- (uint32) ScheduleAutoChk(LogicalDisk)

このメソッドは不良ビットが設定されている場合、次回の再起動のスケジュール chkdsk に使用されます。

  

割り当て済み論理ドライブには適用できません。

Parameters:

  • (string, #read) LogicalDisk

    このバラメータは、次回の再起動時に autochk にスケジュールされるべきドライブの一覧を指定するのに使用されます。 文字列の構文は論理ディスクのドライブ文字を含みます。

Returns:

  • (uint32)


59
60
# File 'lib/Win32_LogicalDisk.rb', line 59

def ScheduleAutoChk LogicalDisk
end

- (uint32) SetPowerState(PowerState, Time)

SetPowerState により、論理デバイスの電源状態およびデバイスがいつその状態に入るかが定義されます。 電源状態は、PowerState パラメータを次の整数値の 1 つに設定することによって指定されます: 1="通常の電力"、2="省電力- 低電力モード"、3="省電力 - スタンバイ"、4="省電力 - その他"、5="電源サイクル" または 6="電源オフ"。 時間パラメータ (5 の "Power Cycle" を除くすべての状態の変更用) は、通常の日付値または間隔値 (メソッド実行の受信時に間隔が開始される) のどちらかにいつ電源状態が設定される必要があるかを示します。 PowerState パラメータが 5 ("Power Cycle") であるとき、時間パラメータはいつデバイスが再度電源オンになるかを示します。 直ちに電源をオフにします。 成功の場合、SetPowerState は 0 を返し、指定された PowerState および要求時間がサポートされていない場合は、1 を返し、ほかのエラーが発生する場合はほかの値が返されます。 サブクラスでは、可能な返信コードのセットはメソッド上の ValueMap 修飾子を使って指定することも可能です。

 ValueMap 

値の配置修飾子としてサブクラスで指定される場合もあります。

Parameters:

  • (uint16, #read) PowerState
  • (datetime, #read) Time

Returns:

  • (uint32)


18
19
# File 'lib/Win32_LogicalDisk.rb', line 18

def SetPowerState PowerState, Time
end