react-native-svg-asset-plugin
Version:
Asset plugin for importing SVG images in React Native
26 lines (21 loc) • 582 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getLastModifiedTime = getLastModifiedTime;
exports.updateLastModifiedTime = updateLastModifiedTime;
const fse = require('fs-extra');
async function getLastModifiedTime(filePath) {
try {
const fileStats = await fse.stat(filePath);
return fileStats.mtimeMs;
} catch (_unused) {
return 0;
}
}
async function updateLastModifiedTime(filePath) {
const currentTime = Date.now() / 1000;
try {
await fse.utimes(filePath, currentTime, currentTime);
} catch (_unused2) {}
}