INNER CODE UNIT · JavaScript

openProject

frangoteam/FUXA · app/electron/main.js:180

async function openProject(parentWin) {
    try {
        const { canceled, filePaths } = await dialog.showOpenDialog(parentWin, {
            properties: ['openDirectory'],
            title: 'Open Project Folder',
            defaultPath: os.homedir()
        });
        if (canceled || !filePaths[0]) return null;

        const projectDir = filePaths[0];
        const dataDir = path.join(projectDir, 'data');
        const appDataDir = path.join(dataDir, '_appdata');
        
        // Check if this is a valid FUXA project
        await fs.access(dataDir);
        await fs.access(appDataDir);
        
        await addRecentProject(projectDir, path.basename(projectDir));

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…