xp-framework/rfc — Issue #196: I/O Collections random access
Author: thekid
Created: 2011-10-17 16:05:11+00:00
State: open
Labels: discussion, framework

Scope of Change
====
There will be methods in the io.collections interfaces that will allow
creating, finding, and removing children.

Rationale
====
Extend the I/O collections classes from read-only to include a full-featured
filesystem access API.

Functionality
====
Creating new elements:

```php
newElement('file.txt');
$folder= $collection->newCollection('etc');
?>
```

Finding elements:

```php
findElement('file.txt');
$folder= $collection->findCollection('etc');
?>
```

Retrieving elements (like finding, but will raise exceptions if elements
specified do not exist):

```php
getElement('file.txt');
$folder= $collection->getCollection('etc');
?>
```

Removing existing elements:

```php
removeElement('file.txt');
$collection->removeCollection('etc');
?>
```

Security considerations
====
n/a

Speed impact
====
n/a

Dependencies
====
io.collections interface changes

Related documents
====
- http://xp-framework.net/rfc/contrib/rfc0196.diff
Implementing patch