Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
genotoul-bioinfo
ng6
Commits
592b26d2
Commit
592b26d2
authored
Sep 17, 2018
by
Gerald Salin
Browse files
#72
replace delete files in purge_directory
parent
0bfa01f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
ui/nG6/lib/class.tx_nG6_utils.php
View file @
592b26d2
...
...
@@ -160,7 +160,8 @@ class tx_nG6_utils {
return
0
;
}
$stream
=
ssh2_exec
(
$connection
,
'ls '
.
$directory
.
'/* | grep -v -e ".html$" -e ".png$" | xargs rm -f'
);
// $stream = ssh2_exec($connection, 'ls '.$directory.'/* | grep -v -e ".html$" -e ".png$" | xargs rm -f' );
$stream
=
ssh2_exec
(
$connection
,
'find '
.
$directory
.
' -maxdepth 1 -not -name "*.html" -not -name "*.png" -type f -exec rm -f {} \;'
);
$errorStream
=
ssh2_fetch_stream
(
$stream
,
SSH2_STREAM_STDERR
);
// Enable blocking for both streams
stream_set_blocking
(
$errorStream
,
true
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment