Haiku API Bindings
Statable
Not logged in

Documentation | StorageKit | Statable

SYNOPSIS

Perl

use HaikuR1::Statable;

my $stat = $statable->GetStat();

Python

from HaikuR1.StorageKit import Statable

stat = statable.GetStat();

DESCRIPTION

Exposes the BStatable object.

For more information on Statable, see the Be Book class description, the Be Book overview, and the Haiku Book class description.

Note that Statable is an abstract object, so there is no constructor. Given that the target languages (Perl and Python) have their own facilities for finding this information, you may not find this function very useful. However, it is the base class for Node, so it has been implemented.

METHODS

Flavor

IsFile

IsDirectory

IsSymLink

These methods do what you expect.

Perl

$statable->IsFile();
$statable->IsDirectory();
$statable->IsSymLink();

Python

statable.IsFile()
statable.IsDirectory()
statable.IsSymLink()

GetNodeRef

Returns a dict with two members, device and node, whose values are integer ids.

Perl

$statable->GetNodeRef();

Python

statable.GetNodeRef()

GetStat

Returns a native map containing information about the node.

A time map is a native map containing the following fields:

Perl

$statable->GetStat();

Python

statable.GetStat()

GetVolume

Returns a Volume object representing the volume that contains the node.

Perl

$statable->GetVolume();

Python

statable.GetVolume()

Properties

GetOwner

SetOwner

GetGroup

SetGroup

GetPermissions

SetPermissions

GetSize

GetModificationTime

SetModificationTime

GetCreationTime

SetCreationTime

GetAccessTime

SetAccessTime

These methods do what you expect.

Perl

$statable->GetOwner();
$statable->SetOwner($owner);
$statable->GetGroup();
$statable->SetGroup($group);
$statable->GetPermissions();
$statable->SetPermissions($perms);
$statable->GetSize();
$statable->GetModificationTime();
$statable->SetModificationTime($time);
$statable->GetCreationTime();
$statable->SetCreationTime($time);
$statable->GetAccessTime();
$statable->SetAccessTime($time);

Python

statable.GetOwner()
statable.SetOwner(owner)
statable.GetGroup()
statable.SetGroup(group)
statable.GetPermissions()
statable.SetPermissions(perms)
statable.GetSize()
statable.GetModificationTime()
statable.SetModificationTime(time)
statable.GetCreationTime()
statable.SetCreationTime(time)
statable.GetAccessTime()
statable.SetAccessTime(time)