[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC] redoxfs.pk: Pickle for RedoxFS file system
From: |
Mohammad-Reza Nabipoor |
Subject: |
Re: [RFC] redoxfs.pk: Pickle for RedoxFS file system |
Date: |
Sat, 19 Dec 2020 20:56:57 +0330 |
Hi, Jose.
On Sat, Dec 19, 2020 at 06:52:42AM +0100, Jose E. Marchesi wrote:
>
> I am thinking, maybe we should allow _print methods with additional
> optional arguments, like:
>
> method _print = (int reverse_p = 0) void: { ... }
>
> The additional arguments would need to be optional, but maybe this is
> useful enough?
I think having more control over the output is useful for users (especially
for complex structures).
>
>
> But it would probably be a better abstraction too add a
> RedoxFS_Filesystem like this:
>
> type RedoxFS_Filesystem =
> struct
> {
> RedoxFS_Header header;
> RedoxFS_Node root @ header.root;
> ...
>
> method visit_extents (RedoxFS_EVisitor v) uint64:
> {
> /* Like above but using root instead of RedoxFS_Node @ root. */
> }
> }
>
> WDYT?
>
`RedoxFS_Filesystem` is a very good idea!
```poke
type RedoxFS_Filesystem =
struct
{
RedoxFS_Header header;
RedoxFS_Node root @ header.root;
RedoxFS_Node[] nodes;
method visit_extents = (RedoxFS_EVisitor v, RedoxFS_Node n = root) uint64:
{
/* ... */
}
method walk = (RedoxFS_Visitor v, RedoxFS_Node n = root) void:
{
/*...*/
}
};
```
Re: [RFC] redoxfs.pk: Pickle for RedoxFS file system, Jose E. Marchesi, 2020/12/18