Skip to content

Commit

Permalink
Merge pull request #2030 from effigies/fix/context-size
Browse files Browse the repository at this point in the history
fix(context): Add file size to context, fixes README_FILE_SMALL
  • Loading branch information
rwblair authored Jul 30, 2024
2 parents 603b46b + 9570834 commit 1b17f77
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bids-validator/src/schema/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ export class BIDSContext implements Context {
this.associations = {} as ContextAssociations
}

get size(): number {
return this.file.size
}

get path(): string {
return this.file.path
}
Expand Down
1 change: 1 addition & 0 deletions bids-validator/src/types/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export interface Context {
dataset: ContextDataset
subject: ContextSubject
path: string
size: number
entities: object
datatype: string
suffix: string
Expand Down

0 comments on commit 1b17f77

Please sign in to comment.