master
elf 2 years ago
parent d72fcede10
commit f3e4890dfb

@ -914,7 +914,7 @@ class ConsoleController extends Think {
);
}
public function unlinkSourceFile() {
public function backupSourceFile() {
$records = M('game_source', 'tab_')->select();
$sourceFiles = array_column($records, 'file_name');
$originalDir = ROOTTT . 'Uploads/Ios/original';
@ -922,7 +922,7 @@ class ConsoleController extends Think {
foreach ($files as $file) {
if (!in_array($file, $sourceFiles)) {
echo 'move [' . $originalDir . '/' . $file . '] to [' . '/data/backup/sourceFile/original/' . $file . ']' . PHP_EOL;
// rename($originalDir . '/' . $file, '/data/backup/sourceFile/original/' . $file);
rename($originalDir . '/' . $file, '/data/backup/sourceFile/original/' . $file);
}
}
$sourceDir = ROOTTT . 'Uploads/SourcePack';
@ -930,7 +930,7 @@ class ConsoleController extends Think {
foreach ($files as $file) {
if (!in_array($file, $sourceFiles)) {
echo 'move [' . $sourceDir . '/' . $file . '] to [' . '/data/backup/sourceFile/' . $file . ']' . PHP_EOL;
// rename($sourceDir . '/' . $file, '/data/backup/sourceFile/' . $file);
rename($sourceDir . '/' . $file, '/data/backup/sourceFile/' . $file);
}
}
}

Loading…
Cancel
Save