-
Notifications
You must be signed in to change notification settings - Fork 230
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add VolumeDirectory and VolumeItem doc pages
- Loading branch information
1 parent
2ba2514
commit b05a5d6
Showing
3 changed files
with
97 additions
and
32 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
doc/source/structures/volumes_and_files/volumedirectory.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
.. _volumedirectory: | ||
|
||
VolumeDirecotry | ||
=============== | ||
|
||
Represents a directory on a kOS file system. | ||
|
||
Instances of this class are enumerable, every step of iteration will provide a :struct:`VolumeFile` or a :struct:`VolumeDirectory` contained in this directory. | ||
|
||
.. structure:: VolumeDirectory | ||
|
||
.. list-table:: Members | ||
:header-rows: 1 | ||
:widths: 1 1 4 | ||
|
||
* - Suffix | ||
- Type | ||
- Description | ||
|
||
* - All suffixes of :struct:`VolumeItem` | ||
- | ||
- :struct:`VolumeDirectory` objects are a type of :struct:`VolumeItem` | ||
|
||
* - :meth:`LIST` | ||
- :struct:`List` of :struct:`VolumeFile` or :struct:`VolumeDirectory` | ||
- Lists all files and directories | ||
|
||
|
||
.. method:: VolumeDirectory:LIST | ||
|
||
:return: :struct:`List` of :struct:`VolumeFile` or :struct:`VolumeDirectory` | ||
|
||
Returns a list of all files and directories in this directory. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
.. _volumeitem: | ||
|
||
VolumeItem | ||
========== | ||
|
||
Contains suffixes common to :struct:`files <VolumeFile>` and :struct:`directories <VolumeDirectory>`. | ||
|
||
.. structure:: VolumeItem | ||
|
||
.. list-table:: Members | ||
:header-rows: 1 | ||
:widths: 1 1 4 | ||
|
||
* - Suffix | ||
- Type | ||
- Description | ||
|
||
|
||
* - :attr:`NAME` | ||
- :struct:`String` | ||
- Name of the item including extension | ||
* - :attr:`EXTENSION` | ||
- :struct:`String` | ||
- Item extension | ||
* - :attr:`SIZE` | ||
- :struct:`Scalar` | ||
- Size of the file | ||
* - :attr:`ISFILE` | ||
- :struct:`Scalar` | ||
- Size of the file | ||
|
||
.. attribute:: VolumeItem:NAME | ||
|
||
:access: Get only | ||
:type: :struct:`String` | ||
|
||
Name of the item, including the extension. | ||
|
||
.. attribute:: VolumeItem:EXTENSION | ||
|
||
:access: Get only | ||
:type: :struct:`String` | ||
|
||
Item extension (part of the name after the last dot). | ||
|
||
.. attribute:: VolumeItem:SIZE | ||
|
||
:access: Get only | ||
:type: :struct:`Scalar` | ||
|
||
Size of the item, in bytes. | ||
|
||
.. attribute:: VolumeItem:ISFILE | ||
|
||
:access: Get only | ||
:type: :struct:`Boolean` | ||
|
||
True if this item is a file | ||
|