ConsoleUser
Copyright (c) 2010-2023 Skaion Corporarion, www.skaion.com
This project was developed in part by numerous sponsorships from the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints of Governmental purposes notwithstanding any copyright notation thereon.
All content reflects those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of the U.S. Government or Skaion Corporation.
- class DiskDefragmentImpl.DiskDefragmentImpl(system, config)¶
This calss is the public interface by which a <no title> can access the disk defragger. This class abstracts away the actual defragger being used.
Parameters:
system: a <no title> object to communicate with the target system
config: a <no title> object hold all our configuration
- clear_complete()¶
Clear any artifacts marking a previous action as complete.
- defrag(block=False)¶
Start the defrag process.
Parameters:
block: whether or not this call should block until the defrag is finished
- is_defragging()¶
Return: True if there is a defrag in processes
- open()¶
Open an instance of the defragger to use.
- pause()¶
Pause a running defrag
- resume()¶
Resume a paused defrag
- should_defrag()¶
Check whether the disk needs to be defragged or not.
- DiskDefragmentImpl.get_disk_defragment(system, config, defrag_type)¶
This is the Factory method that creates an appropriate instance of the disk defragmenter based on either the config object or the specified type.
Parameters:
system: a <no title> object to communicate with the remote system
config: a <no title> object hold all our configuration
defrag_type: a string contining the type to use overriding that in the config object
Return: a concrete instance of DiskDefragmentImpl or None if no suitable type can be found