private List recursiveList()

in src/main/java/com/netflix/bdp/s3mper/listing/ConsistentListingAspect.java [678:704]


    private List<Path> recursiveList(FileSystem fs, Path path) throws IOException {
        List<Path> result = new ArrayList<Path>();
        
        try {
            result.add(path);
            
            if (!fs.isFile(path)) {
                FileStatus[] children = fs.listStatus(path);
                
                if (children == null) {
                    return result;
                }
                
                for (FileStatus child : children) {
                    if (child.isDir()) {
                        result.addAll(recursiveList(fs, child.getPath()));
                    } else {
                        result.add(child.getPath());
                    }
                }
            }
        } catch (Exception e) {
            log.info("A problem occurred recursively deleting path: " + path + " " + e.getMessage());
        }
        
        return result;
    }