# imagify/1.4.6/inc/functions/files.php

Imagify Image Optimization: Optimize Images | Compress &amp; Convert to WebP/AVIF, version 1.4.6. 17 lines.

- Page: https://pluginprobe.com/plugins/imagify/1.4.6/code/inc/functions/files.php
- Raw: https://pluginprobe.com/plugins/imagify/1.4.6/raw/inc/functions/files.php
- Modified: 2016-03-24T21:53:38+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/imagify/1.4.6/code/inc/functions/files.php#L10-L20`.

```php
<?php
defined( 'ABSPATH' ) or die( 'Cheatin\' uh?' );

/**
 * Set the default file permissions using FS_CHMOD_FILE from WP
 *
 * @since 1.2
 *
 * @param string $file The path to file 
 * @return bool
 **/
function imagify_chmod_file( $file ) {
	if ( ! defined( 'FS_CHMOD_FILE' ) ) {
		define( 'FS_CHMOD_FILE', ( fileperms( ABSPATH . 'index.php' ) & 0777 | 0644 ) );
	}
	return @chmod( $file, FS_CHMOD_FILE );
}
```
