Is there an easy way to map directory structure to a MongoDB schema?
https://softwareengineering.stackexchange.com/questions/137694
-
04-11-2019 - |
Question
I'm trying to store a directory structure, including files and their content, in MongoDB. The work is part of a synching app, and is using in Node/Mongoose.
Now, I'm new to Mongo, and it's late here - is the idiomatic implementation as easy as it looks - ie, something like this?
var FileStoreSchema = new Schema({
fullPath: {
type: String,
index: { unique: true }
},
filename: String,
[Metadata and other useful fields]
});
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with softwareengineering.stackexchange