Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96205976
PhabricatorFilesManagementWorkflow.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Dec 23, 18:20
Size
971 B
Mime Type
text/x-php
Expires
Wed, Dec 25, 18:20 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23143362
Attached To
rPH Phabricator
PhabricatorFilesManagementWorkflow.php
View Options
<?php
abstract
class
PhabricatorFilesManagementWorkflow
extends
PhabricatorManagementWorkflow
{
protected
function
buildIterator
(
PhutilArgumentParser
$args
)
{
$names
=
$args
->
getArg
(
'names'
);
if
(
$args
->
getArg
(
'all'
))
{
if
(
$names
)
{
throw
new
PhutilArgumentUsageException
(
"Specify either a list of files or `--all`, but not both."
);
}
return
new
LiskMigrationIterator
(
new
PhabricatorFile
());
}
if
(
$names
)
{
$query
=
id
(
new
PhabricatorObjectQuery
())
->
setViewer
(
$this
->
getViewer
())
->
withNames
(
$names
)
->
withTypes
(
array
(
PhabricatorFilePHIDTypeFile
::
TYPECONST
));
$query
->
execute
();
$files
=
$query
->
getNamedResults
();
foreach
(
$names
as
$name
)
{
if
(
empty
(
$files
[
$name
]))
{
throw
new
PhutilArgumentUsageException
(
"No file '{$name}' exists!"
);
}
}
return
array_values
(
$files
);
}
return
null
;
}
}
Event Timeline
Log In to Comment