Source

vinstall-gambas / src / Partition.class

' Gambas class file
'    This file is part of vinstall-ng

'    vinstall-ng is free software: you can redistribute it and/or modify
'    it under the terms of the GNU General Public License as published by
'    the Free Software Foundation, either version 2 of the License, or
'    (at your option) any later version.

'    vinstall-ng  is distributed in the hope that it will be useful,
'    but WITHOUT ANY WARRANTY; without even the implied warranty of
'    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
'    GNU General Public License for more details.

'    You should have received a copy of the GNU General Public License
'    along with vinstall-ng.  If not, see <http://www.gnu.org/licenses/>.


'----- NOTE: ALL SIZE/DIMENSION VALUES RETURNED IN UNITS=SECTOR -------

PRIVATE $Beginning AS Long
PRIVATE $End AS Long
PRIVATE $Size AS Long
PRIVATE $Number AS Integer
PRIVATE $BlockDevice AS String
PRIVATE $sCurrFs AS String
PRIVATE $Used AS Long
PRIVATE $Free AS Long
PRIVATE $Type AS String
PRIVATE $Flags AS NEW String[]
PRIVATE $RawSize AS String
PRIVATE $SelectedMountpoint AS String
PRIVATE $SelectedFilesystem AS String
PRIVATE $bIsUsed AS Boolean
PRIVATE $bToFormat AS Boolean

PROPERTY CurrentFileSystem AS String
PROPERTY Type AS String
PROPERTY BlockDevice AS String
PROPERTY Number AS Integer
PROPERTY Size AS Long
PROPERTY Fin AS Long
PROPERTY Beginning AS Long
PROPERTY UsedSpace AS Long
PROPERTY FreeSpace AS Long
PROPERTY Flags AS String[]
PROPERTY RawSize AS String
PROPERTY SelectedMountpoint AS String
PROPERTY SelectedFilesystem AS String
PROPERTY IsUsed AS Boolean
PROPERTY ToFormat AS Boolean





PRIVATE FUNCTION BlockDevice_Read() AS String

  RETURN $BlockDevice

END

PRIVATE SUB BlockDevice_Write(Value AS String)

  $BlockDevice = Value

END

PRIVATE FUNCTION Number_Read() AS Integer

  RETURN $Number

END

PRIVATE SUB Number_Write(Value AS Integer)

  $Number = Value

END

PRIVATE FUNCTION Size_Read() AS Long

  RETURN $Size

END

PRIVATE SUB Size_Write(Value AS Long)

  $Size = Value

END

PRIVATE FUNCTION Fin_Read() AS Long

  RETURN $End  

END

PRIVATE SUB Fin_Write(Value AS Long)

  $End = Value

END

PRIVATE FUNCTION Beginning_Read() AS Long

  RETURN $Beginning
  
END

PRIVATE SUB Beginning_Write(Value AS Long)

  $Beginning = Value

END

PRIVATE FUNCTION CurrentFileSystem_Read() AS String

RETURN $sCurrFs  

END

PRIVATE SUB CurrentFileSystem_Write(Value AS String)

  $sCurrFs = Value

END

PRIVATE FUNCTION UsedSpace_Read() AS Long

  RETURN $Used 

END

PRIVATE SUB UsedSpace_Write(Value AS Long)

  $Used = Value

END

PRIVATE FUNCTION FreeSpace_Read() AS Long

  RETURN $Free

END

PRIVATE SUB FreeSpace_Write(Value AS Long)

  $Free = Value

END

PRIVATE FUNCTION Type_Read() AS String

  RETURN $Type

END

PRIVATE SUB Type_Write(Value AS String)

  $Type = Value

END

PRIVATE FUNCTION Flags_Read() AS String[]

  RETURN $Flags

END

PRIVATE SUB Flags_Write(Value AS String[])

  $Flags = Value

END

PRIVATE FUNCTION RawSize_Read() AS String

  RETURN $RawSize

END

PRIVATE SUB RawSize_Write(Value AS String)

  $RawSize = Value

END

PRIVATE FUNCTION SelectedMountpoint_Read() AS String

  RETURN $SelectedMountpoint

END

PRIVATE SUB SelectedMountpoint_Write(Value AS String)

  $SelectedMountpoint = Value

END

PRIVATE FUNCTION SelectedFilesystem_Read() AS String

  RETURN $SelectedFilesystem

END

PRIVATE SUB SelectedFilesystem_Write(Value AS String)

  $SelectedFilesystem = Value

END

PRIVATE FUNCTION IsUsed_Read() AS Boolean

  RETURN $bIsUsed

END

PRIVATE SUB IsUsed_Write(Value AS Boolean)

  $bIsUsed = Value

END

PRIVATE FUNCTION ToFormat_Read() AS Boolean

  RETURN $bToFormat

END

PRIVATE SUB ToFormat_Write(Value AS Boolean)

  $bToFormat = Value  

END