Get Used/Free Disk Space for All Drives on All Platforms

I am creating an Electron app that helps me manage my disk space. However, I would like it to work on Linux/UNIX too. I wrote the following code, which works great for Windows, but not Linux/UNIX systems. window.onload = function(){ const cp = require(‘child_process’) cp.exec(‘wmic logicaldisk get size,freespace,caption’, (error, stdout)=>{ let drives = stdout.trim()split(‘\r\r\n’) .map(value…

Details

React Lifting State in Component with Containment

I currently have a modal system with containment. There is a ModalWrapper that handles closing the modal and form submission. The actual modal content goes in another component, which I called EventsModalForm: Modal Wrapper: import React, { useState } from ‘react’; import PropTypes from ‘prop-types’; import { EVENT_FORM_MODAL } from ‘../layout/modalTypes’; const ModalWrapper = props…

Details