温馨提示:本站仅提供公开网络链接索引服务,不存储、不篡改任何第三方内容,所有内容版权归原作者所有
AI智能索引来源:http://www.bun.com/reference/bun/ArchiveExtractOptions
点击访问原文链接

Bun.ArchiveExtractOptions TypeScript interface | API Reference | Bun

Bun.ArchiveExtractOptions TypeScript interface | API Reference | BunBuildDocsReferenceGuidesBlogDiscord/Bun/ArchiveExtractOptionsPglob

Search the reference...

/

BuildDocsReferenceGuidesBlogDiscord/Bun/ArchiveExtractOptionsPglob

interface

ArchiveExtractOptionsinterface ArchiveExtractOptions

Options for extracting archive contents.

glob?: string | readonly string[]

Glob pattern(s) to filter which entries are extracted. Uses the same syntax as Bun.Glob, including support for wildcards (*, **), character classes ([abc]), alternation ({a,b}), and negation (!pattern).

Patterns are matched against archive entry paths normalized to use forward slashes (/), regardless of the host operating system. Always write patterns using / as the separator.

Positive patterns: Only entries matching at least one pattern will be extracted.Negative patterns (prefixed with !): Entries matching these patterns will be excluded. Negative patterns are applied after positive patterns.

If not specified, all entries are extracted.

// Extract only TypeScript files
await archive.extract("./out", { glob: "**" + "/*.ts" });

// Extract files from multiple directories
await archive.extract("./out", { glob: ["src/**", "lib/**"] });

// Exclude node_modules using negative pattern
await archive.extract("./out", { glob: ["**", "!node_modules/**"] });

// Extract source files but exclude tests
await archive.extract("./out", { glob: ["src/**", "!**" + "/*.test.ts"] });

Resources

ReferenceDocsGuidesDiscordMerch StoreGitHubBlog 

Toolkit

RuntimePackage managerTest runnerBundlerPackage runner

Project

Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicense

Baked with ❤️ in San Francisco

We're hiring →

Bun.ArchiveExtractOptions TypeScript interface | API Reference | Bun,AI智能索引,全网链接索引,智能导航,网页索引

    Options for extracting archive contents.