core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileSystem.java
/**
     * @param name The name of the file.
     * @return children The names of the children.
     */
@param name The name of the file.
@return children The names of the children.
@param name The name of the file . @return children The names of the children .
String[] listChildren(FileName name)
    {
        RamFileData data = this.cache.get(name);
        if (data == null || !data.getType().hasChildren())
        {
            return null;
        }
        Collection<RamFileData> children = data.getChildren();
        String[] names;
        synchronized (children)
        {
            names = new String[children.size()];
            int pos = 0;
            Iterator<RamFileData> iter = children.iterator();
            while (iter.hasNext())
            {
                RamFileData childData = iter.next();
                names[pos] = childData.getName().getBaseName();
                pos++;
            }
        }
        return names;
    }
String [ ] listChildren ( FileName name ) { RamFileData data = this . cache . get ( name ) ; if ( data == null || ! data . getType ( ) . hasChildren ( ) ) { return null ; } Collection < RamFileData > children = data . getChildren ( ) ; String [ ] names ; synchronized ( children ) { names = new String [ children . size ( ) ] ; int pos = 0 ; Iterator < RamFileData > iter = children . iterator ( ) ; while ( iter . hasNext ( ) ) { RamFileData childData = iter . next ( ) ; names [ pos ] = childData . getName ( ) . getBaseName ( ) ; pos ++ ; } } return names ; }
@param name The name of the file.
@param name The name of the file .