Rocky_Mountain_Vending/.pnpm-store/v10/files/0b/8ac5f599e9f398e2cace2e4b98b60a8512b4280c03da7ddbaed80a146692203b0ac52617ee2f550f98d1a0c919a4e969292ab8b3a3325de539079a9729e607
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

26 lines
No EOL
814 B
Text

import { existsSync, promises } from 'fs';
import isError from './is-error';
export var FileType = /*#__PURE__*/ function(FileType) {
FileType["File"] = "file";
FileType["Directory"] = "directory";
return FileType;
}({});
export async function fileExists(fileName, type) {
try {
if (type === "file") {
const stats = await promises.stat(fileName);
return stats.isFile();
} else if (type === "directory") {
const stats = await promises.stat(fileName);
return stats.isDirectory();
}
return existsSync(fileName);
} catch (err) {
if (isError(err) && (err.code === 'ENOENT' || err.code === 'ENAMETOOLONG')) {
return false;
}
throw err;
}
}
//# sourceMappingURL=file-exists.js.map