MCPcopy
hub / github.com/perkeep/perkeep / FileConstraint

Struct FileConstraint

pkg/search/query.go:415–444  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

413}
414
415type FileConstraint struct {
416 // (All non-zero fields must match)
417
418 FileSize *IntConstraint `json:"fileSize,omitempty"`
419 FileName *StringConstraint `json:"fileName,omitempty"`
420 MIMEType *StringConstraint `json:"mimeType,omitempty"`
421 Time *TimeConstraint `json:"time,omitempty"`
422 ModTime *TimeConstraint `json:"modTime,omitempty"`
423
424 // WholeRef if non-zero only matches if the entire checksum of the
425 // file (the concatenation of all its blobs) is equal to the
426 // provided blobref. The index may not have every file's digest for
427 // every known hash algorithm.
428 WholeRef blob.Ref `json:"wholeRef,omitempty"`
429
430 // ParentDir, if non-nil, constrains the file match based on properties
431 // of its parent directory.
432 ParentDir *DirConstraint `json:"parentDir,omitempty"`
433
434 // For images:
435 IsImage bool `json:"isImage,omitempty"`
436 EXIF *EXIFConstraint `json:"exif,omitempty"` // TODO: implement
437 Width *IntConstraint `json:"width,omitempty"`
438 Height *IntConstraint `json:"height,omitempty"`
439 WHRatio *FloatConstraint `json:"widthHeightRation,omitempty"`
440 Location *LocationConstraint `json:"location,omitempty"`
441
442 // MediaTag is for ID3 (and similar) embedded metadata in files.
443 MediaTag *MediaTagConstraint `json:"mediaTag,omitempty"`
444}
445
446type MediaTagConstraint struct {
447 // Tag is the tag to match.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected