Automattic\WooCommerce\Internal\Admin\Logging\FileV2
File::create
Create and set permissions on the file.
Method of the class: File{}
No Hooks.
Returns
true|false
.
Usage
// protected - for code of main (parent) or child class $result = $this->create(): bool;
File::create() File::create code WC 9.9.5
protected function create(): bool { try { $filesystem = FilesystemUtil::get_wp_filesystem(); $created = $filesystem->touch( $this->path ); $modded = $filesystem->chmod( $this->path ); } catch ( Exception $exception ) { return false; } return $created && $modded; }