11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_ciconst common = require('../common'); 31cb0ef41Sopenharmony_ciconst tmpdir = require('../common/tmpdir'); 41cb0ef41Sopenharmony_ciconst assert = require('assert'); 51cb0ef41Sopenharmony_ciconst fs = require('fs'); 61cb0ef41Sopenharmony_ciconst path = require('path'); 71cb0ef41Sopenharmony_ci 81cb0ef41Sopenharmony_citmpdir.refresh(); 91cb0ef41Sopenharmony_ci 101cb0ef41Sopenharmony_ci{ 111cb0ef41Sopenharmony_ci common.expectWarning( 121cb0ef41Sopenharmony_ci 'DeprecationWarning', 131cb0ef41Sopenharmony_ci 'In future versions of Node.js, fs.rmdir(path, { recursive: true }) ' + 141cb0ef41Sopenharmony_ci 'will be removed. Use fs.rm(path, { recursive: true }) instead', 151cb0ef41Sopenharmony_ci 'DEP0147' 161cb0ef41Sopenharmony_ci ); 171cb0ef41Sopenharmony_ci const filePath = path.join(tmpdir.path, 'rmdir-recursive.txt'); 181cb0ef41Sopenharmony_ci fs.writeFileSync(filePath, ''); 191cb0ef41Sopenharmony_ci assert.throws( 201cb0ef41Sopenharmony_ci () => fs.rmdirSync(filePath, { recursive: true }), 211cb0ef41Sopenharmony_ci { code: common.isWindows ? 'ENOENT' : 'ENOTDIR' } 221cb0ef41Sopenharmony_ci ); 231cb0ef41Sopenharmony_ci} 24