Skip to content
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

Using clearstatcache before checking file states/manipulations #6

Open
peter279k opened this issue Mar 23, 2020 · 1 comment
Open

Comments

@peter279k
Copy link
Contributor

peter279k commented Mar 23, 2020

According to clearstatcache function reference, the file state cache is effected on following related file functions:

Affected functions include stat(), lstat(), file_exists(), is_writable(), is_readable(), is_executable(), is_file(), is_dir(), is_link(), filectime(), fileatime(), filemtime(), fileinode(), filegroup(), fileowner(), filesize(), filetype(), and fileperms().

To avoid file stat caching, it should use this function before manipulating any file operation :).

@DivineOmega
Copy link
Owner

This makes sense, though I've yet to see it cause a problem in real world usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants