mirror of
https://github.com/ful1e5/Bibata_Cursor.git
synced 2025-05-30 14:55:21 -04:00
📃 changed to access
This commit is contained in:
parent
06ad25e924
commit
4d56930d8e
1 changed files with 3 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
import { resolve } from "path";
|
||||
import { exists, mkdirSync, writeFileSync } from "fs";
|
||||
import { access, mkdirSync, writeFileSync } from "fs";
|
||||
|
||||
interface WriteSchemaData {
|
||||
path: string;
|
||||
|
@ -8,8 +8,8 @@ interface WriteSchemaData {
|
|||
}
|
||||
|
||||
const writeSchemaData = ({ path, content, fileName }: WriteSchemaData) => {
|
||||
exists(path, (exists) => {
|
||||
if (!exists) {
|
||||
access(path, (isAccessible) => {
|
||||
if (!isAccessible) {
|
||||
mkdirSync(path, { recursive: true });
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue