(bytes: number)
| 233 | } |
| 234 | |
| 235 | function formatFileSize(bytes: number) { |
| 236 | if (bytes === 0) return '0b'; |
| 237 | const k = 1024; |
| 238 | const dm = bytes < k ? 0 : 1; |
| 239 | const sizes = ['b', 'kb']; |
| 240 | const i = Math.floor(Math.log(bytes) / Math.log(k)); |
| 241 | return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + '' + sizes[i]; |
| 242 | } |
| 243 | |
| 244 | export const access = /*#__PURE__*/ promisify(fsAccess); |
| 245 | export const copyFile = /*#__PURE__*/ promisify(fsCopyFile); |
no outgoing calls
no test coverage detected
searching dependent graphs…