Skip to content

Commit

Permalink
lnk parse
Browse files Browse the repository at this point in the history
  • Loading branch information
SOVLOOKUP committed Oct 19, 2023
1 parent f08a821 commit 25e7192
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/sysapp/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { shortcutWin } from "./windows"
import { platform } from "os"
import { exeLookBase64 } from "../../addon"
import { ParsedPath } from "path";

export type CallBack = (app: App) => void | Promise<void>

export interface App {
export interface App extends ParsedPath {
name: string;
description: string;
execPath: string;
Expand Down
3 changes: 1 addition & 2 deletions src/sysapp/windows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ export const shortcutWin = async (callback: CallBack, extraPath: string[] = [])
const hdir = homedir()
const f = new fdir().glob("./**/*.lnk").withFullPaths()
.filter((t) => {
const { name } = parse(t)
const d = parseLnk(t)
callback({
name,
...parse(t),
description: d.nameString,
execPath: d.fullPath,
shortCutPath: t,
Expand Down

0 comments on commit 25e7192

Please sign in to comment.