-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Show file modification time #16589
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
Show file modification time #16589
Conversation
PR Compliance Guide 🔍(Compliance updated until commit c5eab0f)Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label Previous compliance checksCompliance check up to commit 55e8fcf
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||||
60c8dfb to
34b7596
Compare
* GET /se/files -> list all downloaded files * POST /se/files -> get specific file by name * DELETE /se/files -> delete downloaded files
It's available from Java 9, and it also returns an immutable map.
To track the downloading progress and wait for the full download completion, we need to know this info about downloaded files: 1. File modification time 2. File size
34b7596 to
88d9cca
Compare
User description
🔗 Related Issues
Improves #9218
💥 What does this PR do?
This PR adds meta-info about the downloaded files to
/se/filesresponse:Previously, the response contained only file names. This is not enough to determine if the download is fully completed.
🔧 Implementation Notes
DownloadedFile. Currently I added it as internal class to interfaceHasDownloads, but I am open for suggestions. :)🔄 Types of changes
PR Type
Enhancement
Description
Add
DownloadedFileclass to expose file metadata (name, size, creation/modification time)Implement
getDownloadedFiles()method returning list ofDownloadedFileobjectsRefactor
LocalNode.downloadFile()into three focused methods for GET/POST/DELETE operationsReplace
ImmutableMap.of()withMap.of()for Java 9+ compatibilityDiagram Walkthrough
File Walkthrough
HasDownloads.java
Add DownloadedFile class and metadata methodjava/src/org/openqa/selenium/HasDownloads.java
getDownloadedFiles()method to interfaceDownloadedFileclass with name, creation time, lastmodified time, and size properties
LocalNode.java
Refactor downloads endpoint and add file metadata extractionjava/src/org/openqa/selenium/grid/node/local/LocalNode.java
downloadFile()method into three separate methods:listDownloadedFiles(),getDownloadedFile(), anddeleteDownloadedFile()getFileInfo()helper method to extract file metadata usingBasicFileAttributesImmutableMap.of()calls withMap.of()for Java 9+compatibility
DownloadedFileobjects with metadata
RemoteWebDriver.java
Implement getDownloadedFiles() client methodjava/src/org/openqa/selenium/remote/RemoteWebDriver.java
getDownloadedFiles()method returningListDownloadedFileobjects
getDownloadableFiles()to handle new response structure withmetadata
downloaded files