[enh] Put-dir method + refactoring