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

directory-tree

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

directory-tree - npm Package Compare versions

Comparing version 2.2.1 to 2.2.2

102

index.d.ts

@@ -1,54 +0,58 @@

declare const directoryTree: (
path: string,
options?: {
normalizePath?: boolean;
exclude?: RegExp | RegExp[];
attributes?: string[];
extensions?: RegExp;
},
onEachFile?: (item: DirectoryTree, path: string, stats: Stats) => void,
onEachDirectory?: (item: DirectoryTree, path: string, stats: Stats) => void,
) => DirectoryTree;
declare function directoryTree(
path: string,
options?: {
normalizePath?: boolean;
exclude?: RegExp | RegExp[];
attributes?: string[];
extensions?: RegExp;
},
onEachFile?: (item: directoryTree.DirectoryTree, path: string, stats: directoryTree.Stats) => void,
onEachDirectory?: (item: directoryTree.DirectoryTree, path: string, stats: directoryTree.Stats) => void,
): directoryTree.DirectoryTree;
declare class DirectoryTree {
path: string;
name: string;
size: number;
type: "directory" | "file";
children?: DirectoryTree[];
extension?: string;
}
export as namespace directoryTree
/*
* Node.js fs.Stats from
* https://github.com/DefinitelyTyped/DefinitelyTyped/blob/fbe90f14d5f6b6d65c4aa78284f212c736078d19/types/node/index.d.ts#L3696
*/
declare class Stats {
isFile(): boolean;
isDirectory(): boolean;
isBlockDevice(): boolean;
isCharacterDevice(): boolean;
isSymbolicLink(): boolean;
isFIFO(): boolean;
isSocket(): boolean;
dev: number;
ino: number;
mode: number;
nlink: number;
uid: number;
gid: number;
rdev: number;
size: number;
blksize: number;
blocks: number;
atimeMs: number;
mtimeMs: number;
ctimeMs: number;
birthtimeMs: number;
atime: Date;
mtime: Date;
ctime: Date;
birthtime: Date;
declare namespace DirectoryTree {
export class DirectoryTree {
path: string;
name: string;
size: number;
type: "directory" | "file";
children?: DirectoryTree[];
extension?: string;
}
/*
* Node.js fs.Stats from
* https://github.com/DefinitelyTyped/DefinitelyTyped/blob/fbe90f14d5f6b6d65c4aa78284f212c736078d19/types/node/index.d.ts#L3696
*/
export class Stats {
isFile(): boolean;
isDirectory(): boolean;
isBlockDevice(): boolean;
isCharacterDevice(): boolean;
isSymbolicLink(): boolean;
isFIFO(): boolean;
isSocket(): boolean;
dev: number;
ino: number;
mode: number;
nlink: number;
uid: number;
gid: number;
rdev: number;
size: number;
blksize: number;
blocks: number;
atimeMs: number;
mtimeMs: number;
ctimeMs: number;
birthtimeMs: number;
atime: Date;
mtime: Date;
ctime: Date;
birthtime: Date;
}
}
export = directoryTree;
{
"name": "directory-tree",
"version": "2.2.1",
"version": "2.2.2",
"lockfileVersion": 1,

@@ -5,0 +5,0 @@ "requires": true,

{
"name": "directory-tree",
"version": "2.2.1",
"version": "2.2.2",
"description": "Convert a directory tree to a JS object.",

@@ -5,0 +5,0 @@ "repository": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc