Skip to content

Feature request: make fs() context aware #712

@tacman

Description

@tacman

https://castor.jolicode.com/going-further/helpers/filesystem/#filesystem

Is there a way to make fs() context aware

run('bin/console make:controller App -n");
$phpSource = fs()->readFile(context()->workingDirectory . '/src/Controller/AppController.php');

# Preferred:
$phpSource = fs()->readFile('/src/Controller/AppController.php');

What's the best way to handle this situation, without prepending the working directory to the path?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions