public function ServiceAuditFilesNotInDatabase::auditfilesNotInDatabaseFixPathSeparators in Audit Files 8.3
Same name and namespace in other branches
- 8.2 src/ServiceAuditFilesNotInDatabase.php \Drupal\auditfiles\ServiceAuditFilesNotInDatabase::auditfilesNotInDatabaseFixPathSeparators()
- 4.x src/ServiceAuditFilesNotInDatabase.php \Drupal\auditfiles\ServiceAuditFilesNotInDatabase::auditfilesNotInDatabaseFixPathSeparators()
Corrects the separators of a file system's file path.
Changes the separators of a file path, so they are match the ones being used on the operating system the site is running on.
Parameters
string $path: The path to correct.
Return value
string The corrected path.
1 call to ServiceAuditFilesNotInDatabase::auditfilesNotInDatabaseFixPathSeparators()
- ServiceAuditFilesNotInDatabase::auditfilesNotInDatabaseGetFilesForReport in src/
ServiceAuditFilesNotInDatabase.php - Get files for report.
File
- src/
ServiceAuditFilesNotInDatabase.php, line 286
Class
- ServiceAuditFilesNotInDatabase
- Define all methods that are used on Files not in database functionality.
Namespace
Drupal\auditfilesCode
public function auditfilesNotInDatabaseFixPathSeparators($path) {
$path = preg_replace('@\\/\\/@', DIRECTORY_SEPARATOR, $path);
$path = preg_replace('@\\\\@', DIRECTORY_SEPARATOR, $path);
return $path;
}