Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More

@basicserver/filepicker

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@basicserver/filepicker

FilePicker for BasicFsExpress


Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created

FilePicker

FilePicker for BasicServer

Usage

import FilePicker, {SelectedItem, DirectoryItemTypes} from "@basicserver/filepicker";

const selectedItem = new SelectedItem(item => {
    console.log(`You selected: ${item.path}`);
});

const myFilePicker = FilePicker('Root', 'initial/path', selecctedItem,  [DirectoryItemTypes.Directory, DirectoryItemTypes.File]);

Types

/* SelectedItem */

export class SelectedItem {
	name?: string;
	path?: string;
	isDirectory?: boolean;

	listener: (item: SelectedItem) => void;

    /* ... */
}

/* DirectoryItemTypes */
export enum DirectoryItemTypes {
	File,
	Directory,
}

FAQs

Package last updated on 29 Jul 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts