Class: ContentSizeManager

ContentSizeManager(maxSizenullable, maxFilesnullable, extensions)

Handles file processing decisions based on size limits, file count limits, and allowed extensions. Provides functionality to estimate project size and track statistics of processed files.

Constructor

new ContentSizeManager(maxSizenullable, maxFilesnullable, extensions)

Parameters:
Name Type Attributes Description
maxSize number <nullable>

Maximum allowed size per file in KB. Null means no limit.

maxFiles number <nullable>

Maximum number of files to process. Null means no limit.

extensions Array.<string>

Array of allowed file extensions (e.g., ['.js', '.txt'])

Properties:
Name Type Description
currentSize number

Current total size of processed files in KB

fileCount number

Current count of processed files

allowedExtensions Set.<string>

Set of allowed file extensions

stats Object

Statistics tracking object

Properties
Name Type Description
totalFiles number

Total number of processed files

totalSize number

Total size of processed files in KB

skippedFiles number

Number of files skipped

skippedSize number

Total size of skipped files in KB

Source: