Skip to main content

Files

DrevOps\BehatSteps\Steps\Drupal\FileTrait - Source, Steps

Manage Drupal file entities with upload and storage operations.

public function fileCreateEntity(string $path, EntityStubInterface $stub, ?string $uri = NULL): EntityStubInterface

Create file entity

public function fileCreateManaged(string $path, EntityStubInterface $stub, ?string $uri = NULL): EntityStubInterface

Create a single managed file

public function fileDeleteManaged(array $conditions): void

Delete the managed files that match conditions

public function fileGetUnmanagedContent(string $uri): string

Get the content of an unmanaged file

public function fileLoadMultiple(array $conditions = []): array

Load multiple files with specified conditions

public function fileWriteUnmanaged(string $uri, string $content): void

Write an unmanaged file, creating its directory when it is missing