Java Code Examples for com.liulishuo.filedownloader.util.FileDownloadUtils#getTargetFilePath()

The following examples show how to use com.liulishuo.filedownloader.util.FileDownloadUtils#getTargetFilePath() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DownloadTaskAdapter.java    From okdownload with Apache License 2.0 4 votes vote down vote up
@Override
public String getTargetFilePath() {
    return FileDownloadUtils
            .getTargetFilePath(builder.path, builder.pathAsDirectory, getFilename());
}
 
Example 2
Source File: DownloadTask.java    From FileDownloader with Apache License 2.0 4 votes vote down vote up
@Override
public String getTargetFilePath() {
    return FileDownloadUtils.getTargetFilePath(getPath(), isPathAsDirectory(), getFilename());
}
 
Example 3
Source File: FileDownloadModel.java    From FileDownloader with Apache License 2.0 2 votes vote down vote up
/**
 * Get the finally target file path is used for store the download file.
 * <p/>
 * This path is composited with {@link #path}、{@link #pathAsDirectory}、{@link #filename}.
 * <p/>
 * Why {@link #getPath()} may be not equal to getTargetFilePath()? this case only occurred
 * when the {@link #isPathAsDirectory()} is {@code true}, on this scenario the
 * {@link #getPath()} is directory, and the getTargetFilePath() is 'directory + "/" + filename'.
 *
 * @return the finally target file path.
 */
public String getTargetFilePath() {
    return FileDownloadUtils.getTargetFilePath(getPath(), isPathAsDirectory(), getFilename());
}