Package pyanaconda :: Package storage :: Module devices :: Class FileDevice
[hide private]
[frames] | no frames]

Class FileDevice

source code

object --+        
         |        
    Device --+    
             |    
 StorageDevice --+
                 |
                FileDevice

A file on a filesystem.

This exists because of swap files.

Instance Methods [hide private]
 
__init__(self, path, format=None, size=None, exists=None, parents=None)
Create a FileDevice instance.
source code
 
fstabSpec(self) source code
 
path(self)
Device node representing this device.
source code
 
_preSetup(self, orig=False)
Preparation and pre-condition checking for device setup.
source code
 
_preTeardown(self, recursive=None)
Preparation and pre-condition checking for device teardown.
source code
 
_create(self, w)
Create the device.
source code
 
_destroy(self)
Destroy the device.
source code

Inherited from StorageDevice: __repr__, __str__, checkSize, create, currentSize, destroy, dict, disks, encrypted, formatArgs, growable, isDisk, maxSize, minSize, model, notifyKernel, packages, partedDevice, partitionable, partitioned, preCommitFixup, removable, resizable, resize, serial, services, setup, setupParents, status, teardown, updateSysfsPath, vendor

Inherited from Device: __deepcopy__, addChild, dependsOn, dracutSetupArgs, isleaf, mediaPresent, name, removeChild, teardownParents, type, typeDescription, writeKS

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]
  _type = "file"
  _devDir = ""

Inherited from StorageDevice: format, size, sysfsBlockDir, targetSize

Inherited from StorageDevice (private): _isDisk, _partitionable, _resizable

Inherited from Device (private): _id, _packages, _services

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, path, format=None, size=None, exists=None, parents=None)
(Constructor)

source code 
Create a FileDevice instance.

Arguments:

    path -- full path to the file

Keyword Arguments:

    format -- a DeviceFormat instance
    size -- the file size (units TBD)
    parents -- a list of required devices (Device instances)
    exists -- indicates whether this is an existing device

Overrides: object.__init__

fstabSpec(self)

source code 
Decorators:
  • @property
Overrides: StorageDevice.fstabSpec

path(self)

source code 

Device node representing this device.

Decorators:
  • @property
Overrides: StorageDevice.path
(inherited documentation)

_preSetup(self, orig=False)

source code 

Preparation and pre-condition checking for device setup.

Return True if setup should proceed or False if not.

Overrides: StorageDevice._preSetup
(inherited documentation)

_preTeardown(self, recursive=None)

source code 

Preparation and pre-condition checking for device teardown.

Return True if teardown should proceed or False if not.

Overrides: StorageDevice._preTeardown
(inherited documentation)

_create(self, w)

source code 

Create the device.

Overrides: StorageDevice._create

_destroy(self)

source code 

Destroy the device.

Overrides: StorageDevice._destroy