2017-10-31 23:09:36 -04:00
|
|
|
const ConcreteFilesystem = Class( 'ConcreteFilesystem' )
|
2012-05-05 14:09:27 -04:00
|
|
|
.implement( Filesystem ) // multiple interfaces as separate arguments
|
|
|
|
{
|
2017-10-31 23:09:36 -04:00
|
|
|
'public open'( path, mode )
|
2012-05-05 14:09:27 -04:00
|
|
|
{
|
|
|
|
return { path: path, mode: mode };
|
|
|
|
},
|
|
|
|
|
2017-10-31 23:09:36 -04:00
|
|
|
'public read'( handle, length )
|
2012-05-05 14:09:27 -04:00
|
|
|
{
|
|
|
|
return "";
|
|
|
|
},
|
|
|
|
|
2017-10-31 23:09:36 -04:00
|
|
|
'public write'( handle, data )
|
2012-05-05 14:09:27 -04:00
|
|
|
{
|
|
|
|
// ...
|
|
|
|
return data.length;
|
|
|
|
},
|
|
|
|
|
2017-10-31 23:09:36 -04:00
|
|
|
'public close'( handle )
|
2012-05-05 14:09:27 -04:00
|
|
|
{
|
|
|
|
// ...
|
|
|
|
return this;
|
|
|
|
},
|
|
|
|
} );
|