Skip to content

File

reference
1 min readUpdated

Kind: Class

Source: Pams/Web/Pams.WebApp/Client/app/models/common/files.model.ts (line 5)

Part of: Pams

File is a client-side model for file-related data in the Pams web application. Its clone and cloneList methods create copied File instances for workflows that should not mutate an existing model.

Methods

MethodSignatureReturns
cloneclone(fi: File)File
cloneListcloneList(FL: File[])File[]

Properties

PropertyType
FileIDnumber
FileNamestring
FileTitlestring
ParentFileIDnumber
FileTypestring
FilePathstring
UploadedFileIDstring
SizeInBytesstring
CreationDateDate
ModificationDateDate
CreatedByIDnumber
ModificatedByIDnumber
CompanyBranchIDnumber
selectedboolean
FileTagsTag[]
FileCommentsComment[]

Diagram

mermaid
graph LR
  File[File model] --> Clone[clone(): File]
  File --> CloneList[cloneList(): File[]]
  Clone --> FileCopy[Copied File]
  CloneList --> FileCopies[Copied File list]

Usage

ts
import { File } from 'app/models/common/files.model';

function prepareFileCopies(sourceFile: File): File[] {
  const copiedFile: File = sourceFile.clone();
  const copiedFiles: File[] = sourceFile.cloneList();

  return [copiedFile, ...copiedFiles];
}

AI Coding Instructions

  • Call clone() before changing a File model that may still be referenced elsewhere.
  • Use cloneList() when the calling code expects an array of copied File models.
  • Avoid confusing this application model with the browser's native File type.
  • Keep imports pointed at app/models/common/files.model when working with this model.

Relationships

  • IMPORTS → Tag
  • IMPORTS → Comment

Used by

5 references from 5 files. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.

Imported by (5)

  • FilesServicePams/Web/Pams.WebApp/Client/app/services/common/files.service.ts:1
  • PersonServicePams/Web/Pams.WebApp/Client/app/services/person/person.service.ts:1
  • FilesPortServicePams/Web/Pams.WebApp/Client/app/services/shared/files-port-service.service.ts:1
  • PersonPams/Web/Pams.WebApp/Client/app/models/person/person.model.ts:4
  • PortDataPams/Web/Pams.WebApp/Client/app/models/shared/files-port.model.ts:2

Was this page helpful?

Download as PDF