Skip to content

Commit

Permalink
[7.1.0] Remove obsolete comments and dividers. (#21185)
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 585632524
Change-Id: I559bc9f6abc859ab7578a8918efb863c5bfe9e9b
  • Loading branch information
tjgq authored Feb 2, 2024
1 parent dbbfb0f commit b403a1f
Showing 1 changed file with 3 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -398,16 +398,13 @@ protected byte[] getDigest(PathFragment path) throws IOException {
return localFs.getPath(path).getDigest();
}

// -------------------- File Permissions --------------------
// Remote files are always readable, writable and executable since we can't control their
// permissions.

@Override
protected boolean isReadable(PathFragment path) throws IOException {
path = resolveSymbolicLinks(path).asFragment();
try {
return localFs.getPath(path).isReadable();
} catch (FileNotFoundException e) {
// Remote files are always readable since we can't control their permissions.
return true;
}
}
Expand All @@ -418,6 +415,7 @@ protected boolean isWritable(PathFragment path) throws IOException {
try {
return localFs.getPath(path).isWritable();
} catch (FileNotFoundException e) {
// Remote files are always writable since we can't control their permissions.
return true;
}
}
Expand All @@ -428,6 +426,7 @@ protected boolean isExecutable(PathFragment path) throws IOException {
try {
return localFs.getPath(path).isExecutable();
} catch (FileNotFoundException e) {
// Remote files are always executable since we can't control their permissions.
return true;
}
}
Expand Down Expand Up @@ -472,8 +471,6 @@ protected void chmod(PathFragment path, int mode) throws IOException {
}
}

// -------------------- Symlinks --------------------

@Override
protected PathFragment readSymbolicLink(PathFragment path) throws IOException {
PathFragment parentPath = path.getParentDirectory();
Expand Down Expand Up @@ -536,8 +533,6 @@ protected PathFragment resolveOneLink(PathFragment path) throws IOException {
return stat.isSymbolicLink() ? readSymbolicLink(path) : null;
}

// -------------------- Implementations based on stat() --------------------

@Override
protected long getLastModifiedTime(PathFragment path, boolean followSymlinks) throws IOException {
FileStatus stat = stat(path, followSymlinks);
Expand Down Expand Up @@ -842,15 +837,6 @@ private Dirent maybeFollowSymlinkForDirent(
return new Dirent(entry.getName(), direntFromStat(st));
}

/*
* -------------------- TODO(buchgr): Not yet implemented --------------------
*
* The below methods have not (yet) been properly implemented due to time constraints mostly and
* with little risk as they currently don't seem to be used by internal actions in Bazel. However,
* before making the --experimental_remote_download_outputs flag non-experimental we should make
* sure to fully implement this file system.
*/

@Override
protected void createFSDependentHardLink(PathFragment linkPath, PathFragment originalPath)
throws IOException {
Expand Down

0 comments on commit b403a1f

Please sign in to comment.