Creating a file object is one activity, not a sequence of calls: the file comes with the call, the object is created, put into the tree and given its content - or nothing is left behind.
Listing what is below a node is a matter of the repository, not of this component, so it is not contributed as an Activity. It stays as code, because listing files is that listing plus what a file is.
Reading a file of the repository is guarded by the read permission on the object; the resource behind it is then delivered by the according activity of the ResourceStorage, which trusts this check.
Everything else a file object can do: its data, its versions, where it lives, and whether it lives at all.
Packing a container performs the listing and the delivery of every single file, so it cannot pack what a user may not read.
66 : void {
67 $implement[DownloadLimit::class] = static fn() =>
69 $pull[Connection::class]
70 );
71
72 $contribute[Agent::class] = static fn() =>
73 new \ilFileObjectAgent(
74 $pull[Factory::class]
75 );
76
77 $contribute[PublicAsset::class] = fn() =>
78 new OfComponent($this,
"default_file_icons",
"assets");
79
80 $contribute[\ILIAS\StaticURL\Handler\Handler::class] = static fn() =>
81 new \ilFileStaticURLHandler();
82
89 $use[Access::class],
90 $use[RBAC::class],
91 );
92
93 $internal[CreateFile::class] =
static fn() =>
new CreateFile(
94 $pull[FileParameter::class],
95 $internal[RepositoryProvider::class],
96 $pull[Parameter::class],
97 );
98
100 $pull[FileParameter::class],
101 $internal[RepositoryProvider::class],
102 $pull[Parameter::class],
103 );
104
111 $internal[RepositoryProvider::class],
112 $pull[Parameter::class],
113 );
114
115 $internal[ListFiles::class] =
static fn() =>
new ListFiles(
116 $internal[RepositoryProvider::class],
117 $internal[ListContainerContent::class],
118 $pull[Parameter::class],
119 );
120
127 $internal[RepositoryProvider::class],
128 $pull[DeliverResource::class],
129 $pull[FilePayloadFactory::class],
130 $pull[Parameter::class],
131 );
132
138 $internal[RepositoryProvider::class],
139 $pull[Parameter::class],
140 );
141
142 $internal[DeleteFile::class] =
static fn() =>
new DeleteFile(
143 $internal[RepositoryProvider::class],
144 $pull[Parameter::class],
145 );
146
147 $internal[MoveFile::class] =
static fn() =>
new MoveFile(
148 $internal[RepositoryProvider::class],
149 $pull[Parameter::class],
150 );
151
152 $internal[CopyFile::class] =
static fn() =>
new CopyFile(
153 $internal[RepositoryProvider::class],
154 $pull[Parameter::class],
155 );
156
158 $internal[RepositoryProvider::class],
159 $pull[StorageProvider::class],
160 $pull[Parameter::class],
161 );
162
164 $internal[RepositoryProvider::class],
165 $pull[StorageProvider::class],
166 $pull[FilePayloadFactory::class],
167 $pull[Parameter::class],
168 );
169
174 $internal[DownloadContainerAsZip::class] = static fn() =>
176 $internal[ListFiles::class],
177 $internal[DeliverFileObject::class],
178 $pull[FilePayloadFactory::class],
179 $pull[Parameter::class],
180 );
181
188 $provide[CreateFile::class] = static fn() => $internal[CreateFile::class];
189 $provide[ReplaceFileContent::class] = static fn() =>
190 $internal[ReplaceFileContent::class];
191 $provide[ListFiles::class] = static fn() => $internal[ListFiles::class];
192 $provide[ListContainerContent::class] = static fn() =>
193 $internal[ListContainerContent::class];
194 $provide[DeliverFileObject::class] = static fn() =>
195 $internal[DeliverFileObject::class];
196
197 $contribute[Activity::class] = static fn() => $internal[CreateFile::class];
198 $contribute[Activity::class] = static fn() => $internal[ReplaceFileContent::class];
199 $contribute[Activity::class] = static fn() => $internal[ListFiles::class];
200 $contribute[Activity::class] = static fn() => $internal[DeliverFileObject::class];
201 $contribute[Activity::class] = static fn() => $internal[UpdateFileMetadata::class];
202 $contribute[Activity::class] = static fn() => $internal[DeleteFile::class];
203 $contribute[Activity::class] = static fn() => $internal[MoveFile::class];
204 $contribute[Activity::class] = static fn() => $internal[CopyFile::class];
205 $contribute[Activity::class] = static fn() => $internal[ListFileVersions::class];
206 $contribute[Activity::class] = static fn() => $internal[DeliverFileVersion::class];
207 $contribute[Activity::class] = static fn() => $internal[DownloadContainerAsZip::class];
208
210 $this,
211 'file'
212 );
213 }
An public asset that is a resource of some component.
Copy a file object into another container.
Create a file object in the repository - in one call.
Deliver the content of a file object of the repository.
Deliver an earlier version of a file object.
Deliver the files of a container as one zip archive.
List what is in a container of the repository.
List the versions of a file object.
List the files in a container of the repository.
Move a file object to another container.
Give an existing file object new content - in one call.
The bits of the repository the file activities need: the tree to check where a file may go and access...