Skip to content

Commit 8154ae7

Browse files
Section Explaining deleteOldFiles (#2838)
--------- Co-authored-by: sciencewhiz <[email protected]>
1 parent 88374bc commit 8154ae7

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

source/docs/software/advanced-gradlerio/compiler-args.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,19 @@ frcJava(getArtifactClass('FRCJavaArtifact')) {
4141
}
4242
```
4343

44+
## Deleting Unused Deploy Files
45+
46+
By default the `src/main/deploy` directory in your project is transferred to the roboRIO when code is deployed. It is initiated by this section of the `build.gradle` file.
47+
48+
```groovy
49+
frcStaticFileDeploy(getArtifactTypeClass('FileTreeArtifact')) {
50+
files = project.fileTree('src/main/deploy')
51+
directory = '/home/lvuser/deploy'
52+
deleteOldFiles = false // Change to true to delete files on roboRIO that no
53+
// longer exist in deploy directory on roboRIO
54+
}
55+
```
56+
57+
This will overwrite any duplicate files found in the `/home/lvuser/deploy` directory on the RIO and copy over any additional not present there. If `deleteOldFiles` is false it will not remove any files no longer present in the project deploy directory. Changing it to `true` helps prevent programs like :doc:`Choreo </docs/software/wpilib-tools/choreo/index>` and [PathPlanner](https://github.com/mjansen4857/pathplanner) from getting confused by files that were deleted locally but still exist on the roboRIO.
58+
59+
If you want to manage the roboRIO files directly, the :doc:`FTP documentation </docs/software/roborio-info/roborio-ftp>` provides one method to do so.

source/docs/yearly-overview/yearly-changelog.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ Supported Operating Systems and Architectures:
165165

166166
- Use Gradle 8.10.2
167167
- Use shell scripts for launching tools on Linux / macOS, since macOS doesn't ship Python any more
168-
- Add method to delete files on roboRIO that have been deleted in the deploy directory. Set deleteOldFiles to true in the frcStaticFileDeploy block
168+
- Add method to delete files on roboRIO that have been deleted in the deploy directory. :ref:`Set deleteOldFiles to true <docs/software/advanced-gradlerio/compiler-args:Deleting Unused Deploy Files>` in the frcStaticFileDeploy block
169169

170170
## WPILib All in One Installer
171171

0 commit comments

Comments
 (0)