I'm trying to create an index of all file(path)s within a given folder. So far I worked with gulp.src(filePath)
to achieve that. According to this blog post, it should work:
gulp.src(files) is a string or array containing the file(s) / file paths.
My current code:
gulp.task("createFileIndex", function(){
var index = gulp.src(['./content/**/*.*']);
console.log("INDEX:", index[0]);
});
By outputing the returned values of gulp.src()
with index[0]
I get undefined
and the whole index
outputs only a large dictionary without any filepaths.