src/Codeception/Module/WPFilesystem.php
public function getUploadsPath($file = '', $date = null)
    {
        $dateFrag = $date !== null ?
            $this->buildDateFrag($date)
            : '';

        $uploads = Utils::untrailslashit($this->config['uploads']);
        $path = $file;
        if (false === strpos($file, $uploads)) {
            $path = implode(DIRECTORY_SEPARATOR, array_filter([
                $uploads,
                $dateFrag,
                Utils::unleadslashit($file),
            ]));
        }

        return $path;
    }
public function getUploadsPath($file = '', $date = null)
    {
        $dateFrag = $date !== null ?
            $this->buildDateFrag($date)
            : '';

        $uploads = Utils::untrailslashit($this->config['uploads']);
        $path = $file;
        if (false === strpos($file, $uploads)) {
            $path = implode(DIRECTORY_SEPARATOR, array_filter([
                $uploads,
                $dateFrag,
                Utils::unleadslashit($file),
            ]));
        }

        return $path;
    }
public function getUploadsPath ( $ file = '' , $ date = null ) { $ dateFrag = $ date !== null ? $ this -> buildDateFrag ( $ date ) : '' ; $ uploads = Utils :: untrailslashit ( $ this -> config [ 'uploads' ] ) ; $ path = $ file ; if ( false === strpos ( $ file , $ uploads ) ) { $ path = implode ( DIRECTORY_SEPARATOR , array_filter ( [ $ uploads , $ dateFrag , Utils :: unleadslashit ( $ file ) , ] ) ) ; } return $ path ; }
Returns the path to the specified uploads file of folder.

Not providing a value for `$file` and `$date` will return the uploads folder path.

@example
```php
$todaysPath = $I->getUploadsPath();
$lastWeek = $I->getUploadsPath('', '-1 week');
```

@param string $file The file path, relative to the uploads folder.
@param string|int $date A string compatible with `strtotime` or a Unix timestamp.

@return string The absolute path to an uploaded file.
Returns the path to the specified uploads file of folder .