Package com.codeborne.selenide.files
Class DownloadedFile
java.lang.Object
com.codeborne.selenide.files.DownloadedFile
-
Constructor Summary
ConstructorsConstructorDescriptionDownloadedFile(File file, long lastModifiedTime, long size, Map<String, String> headers) -
Method Summary
Modifier and TypeMethodDescriptionstatic DownloadedFilefileWithName(String fileName) @Nullable StringgetFile()getName()booleanbooleanisFileModifiedLaterThan(long timestamp) Depending on OS, file modification time can have seconds precision, not milliseconds.longstatic DownloadedFilelongsize()toString()
-
Constructor Details
-
DownloadedFile
- Parameters:
file- the downloaded fileheaders- map of http headers. NB! Map keys (header names) are LOWER CASE!
-
-
Method Details
-
getFile
-
getName
-
extension
-
size
public long size() -
hasContentDispositionHeader
public boolean hasContentDispositionHeader() -
getContentType
-
lastModifiedTime
public long lastModifiedTime() -
isFileModifiedLaterThan
public boolean isFileModifiedLaterThan(long timestamp) Depending on OS, file modification time can have seconds precision, not milliseconds. We have to ignore the difference in milliseconds. -
toString
-
fileWithName
-
localFile
-