You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The checkAccess() function currently fails to correctly check read access for files on a network drive, because it relies on the base R function file.access(), which has long had issues correctly checking read access for files on network drives.
This proposal is to update checkAccess() to add a backup option when file.access() indicates that a file is unreadable. The method for doing this is copied from the R.utils package's function, named fileAccess(), which was developed in part to deal with this problem with network drives.
I'm making a small pull request that implements this proposal.
Background
Unfortunately, many organizations with network drives have policies that require all data files to be stored on a network drive, so just copying files to a local folder isn't a workaround for such users. This comes up at the company I work for and at the federal agency clients I work for.
For some background, here are a couple references on the issue with base file.access():
It works by first trying to use file.access(), and then--if the file appears unreadable based on that--then attempts a small read of the file and checks whether that read was successful.
It would be very helpful if checkmate adopted this same approach. But rather than add 'R.utils' as a dependency, 'checkmate' can simply re-use some code, with attribution.
The text was updated successfully, but these errors were encountered:
bschneidr
pushed a commit
to bschneidr/checkmate
that referenced
this issue
Sep 4, 2024
Summary
The
checkAccess()
function currently fails to correctly check read access for files on a network drive, because it relies on the base R functionfile.access()
, which has long had issues correctly checking read access for files on network drives.This proposal is to update
checkAccess()
to add a backup option whenfile.access()
indicates that a file is unreadable. The method for doing this is copied from the R.utils package's function, namedfileAccess()
, which was developed in part to deal with this problem with network drives.I'm making a small pull request that implements this proposal.
Background
Unfortunately, many organizations with network drives have policies that require all data files to be stored on a network drive, so just copying files to a local folder isn't a workaround for such users. This comes up at the company I work for and at the federal agency clients I work for.
For some background, here are a couple references on the issue with base
file.access()
:@HenrikBengtsson implemented a more robust version of
file.access()
in the "R.utils" package.It works by first trying to use
file.access()
, and then--if the file appears unreadable based on that--then attempts a small read of the file and checks whether that read was successful.It would be very helpful if checkmate adopted this same approach. But rather than add 'R.utils' as a dependency, 'checkmate' can simply re-use some code, with attribution.
The text was updated successfully, but these errors were encountered: