classic-level icon indicating copy to clipboard operation
classic-level copied to clipboard

Poll: should the location directory be created recursively?

Open vweevers opened this issue 3 years ago • 2 comments

Follow-up for https://github.com/Level/classic-level/pull/6.

In the following example, should the location directory be created recursively? Such that, if the foo directory does not exist, it will be created (on open) rather than yielding an error?

const db = new ClassicLevel('foo/bar')

Creating it recursively is the current behavior of classic-level (and new compared to leveldown) which may break expectations given typical filesystem behavior, or it could be a convenient feature, if the database is considered to abstract away the filesystem.

React with thumbs up to create the directory recursively, react with thumbs down to yield an error. This question is about what the default behavior should be, so I'm purposefully not including a poll option to make either behavior opt-in.

vweevers avatar Mar 11 '22 10:03 vweevers

@juliangruber Could you please check that the above text is not biased towards my personal preference?

vweevers avatar Mar 11 '22 10:03 vweevers

Thank you for asking :) I think the text is fine!

juliangruber avatar Mar 11 '22 10:03 juliangruber