<commit_before>import ceylon.file { ... }

import java.nio.file { JPath=Path, 
                       Files { movePath=move, 
                               newDirectoryStream } }

class ConcreteDirectory(JPath jpath)
        extends ConcreteExistingResource(jpath) 
        satisfies Directory {
    shared actual Iterable<Path> childPaths(String filter) {
        //TODO: efficient impl
        value sb = SequenceBuilder<Path>();
        value stream = newDirectoryStream(jpath, filter);
        value iter = stream.iterator();
        while (iter.hasNext()) {
            sb.append(ConcretePath(iter.next()));
        }
        stream.close();
        return sb.sequence;
    }
    shared actual Iterable<ExistingResource> children(String filter) {
        return elements { for (p in childPaths(filter)) 
                 if (is ExistingResource r=p.resource) r };
    }
    shared actual Iterable<File> files(String filter) {
        return elements { for (p in childPaths(filter))
                 if (is File r=p.resource) r };
    }
    shared actual Iterable<Directory> childDirectories(String filter) {
        return elements { for (p in childPaths(filter))
                 if (is Directory r=p.resource) r };
    }
    shared actual Resource childResource(Path|String subpath) {
        return path.childPath(subpath).resource;
    }
    shared actual Directory move(Nil target) {
        return ConcreteDirectory( movePath(jpath, asJPath(target.path)) );
    }
}<commit_msg>Fix for sequenced args and iterables<commit_after>import ceylon.file { ... }

import java.nio.file { JPath=Path, 
                       Files { movePath=move, 
                               newDirectoryStream } }

class ConcreteDirectory(JPath jpath)
        extends ConcreteExistingResource(jpath) 
        satisfies Directory {
    shared actual Iterable<Path> childPaths(String filter) {
        //TODO: efficient impl
        value sb = SequenceBuilder<Path>();
        value stream = newDirectoryStream(jpath, filter);
        value iter = stream.iterator();
        while (iter.hasNext()) {
            sb.append(ConcretePath(iter.next()));
        }
        stream.close();
        return sb.sequence;
    }
    shared actual Iterable<ExistingResource> children(String filter) {
        return elements { {for (p in childPaths(filter)) 
                 if (is ExistingResource r=p.resource) r}... };
    }
    shared actual Iterable<File> files(String filter) {
        return elements { {for (p in childPaths(filter))
                 if (is File r=p.resource) r}... };
    }
    shared actual Iterable<Directory> childDirectories(String filter) {
        return elements { {for (p in childPaths(filter))
                 if (is Directory r=p.resource) r}... };
    }
    shared actual Resource childResource(Path|String subpath) {
        return path.childPath(subpath).resource;
    }
    shared actual Directory move(Nil target) {
        return ConcreteDirectory( movePath(jpath, asJPath(target.path)) );
    }
}
{'fraction_non_alphanumeric': 0.10179045092838196, 'fraction_numerical': 0.0, 'mean_word_length': 2.326350606394708, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3952779', 'n_tokens_mistral': 815, 'n_tokens_neox': 798, 'n_words': 211}