-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fopen($path, 'x')
should not succeed when called twice
#16
Comments
Relevant PHP documentation for behaviour of
https://www.php.net/manual/en/function.fopen.php I think the issue there is the need to have some distributed lock system. Technically once your filesystem is on a network locks need to be enforced on the network, which they cannot be using some of the flysystem backends, which don't support file/object-level locking. A Person could add a redis or similar fast network key-value store which supports locking, but then you have a whole new set of dependencies and class of problems to solve. I'd recommend perhaps the addition of a locking interface to use when this is required; but then marking this as |
When using those backends that don't support file/object-level locking, any call to |
Seems like PHP via flock could be interpreted to agree.
hints about the interface implementation are then given
However... Crucially I think perhaps the following gives a hint at a more permissive interpretation.
There are already examples of where The two places this would make sense to complain to would be flysystem, or PHP |
The
x
mode forfopen()
should fail when called twice, as the first call should create the file.Expected result:
Actual result:
The text was updated successfully, but these errors were encountered: