本文整理了Java中hudson.FilePath.length()
方法的一些代码示例,展示了FilePath.length()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FilePath.length()
方法的具体详情如下:
包路径:hudson.FilePath
类名称:FilePath
方法名:length
[英]Returns the file size in bytes.
[中]返回以字节为单位的文件大小。
代码示例来源:origin: jenkinsci/jenkins
@Override public long length() throws IOException {
try {
return f.length();
} catch (InterruptedException x) {
throw new IOException(x);
}
}
@Override public int mode() throws IOException {
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
@Override public long length() throws IOException {
try {
return f.length();
} catch (InterruptedException x) {
throw (IOException) new IOException(x.toString()).initCause(x);
}
}
@Override public long lastModified() throws IOException {
代码示例来源:origin: jenkinsci/pipeline-aws-plugin
protected FileWrapper(@Nonnull FilePath base, @Nonnull FilePath file) throws IOException, InterruptedException {
this(file.getName(),
file.getRemote().substring(base.getRemote().length() + 1),
file.isDirectory(),
file.length(),
file.lastModified()
);
}
代码示例来源:origin: org.jenkins-ci.plugins/pipeline-utility-steps
protected FileWrapper(@Nonnull FilePath base, @Nonnull FilePath file) throws IOException, InterruptedException {
this(file.getName(),
file.getRemote().substring(base.getRemote().length() + 1),
file.isDirectory(),
file.length(),
file.lastModified());
}
代码示例来源:origin: jenkinsci/pipeline-utility-steps-plugin
protected FileWrapper(@Nonnull FilePath base, @Nonnull FilePath file) throws IOException, InterruptedException {
this(file.getName(),
file.getRemote().substring(base.getRemote().length() + 1),
file.isDirectory(),
file.length(),
file.lastModified());
}
代码示例来源:origin: jenkinsci/pipeline-aws-plugin
protected FileWrapper(@Nonnull FilePath file) throws IOException, InterruptedException {
this(file.getName(), file.getRemote(), file.isDirectory(), file.length(), file.lastModified());
}
代码示例来源:origin: org.jenkins-ci.plugins/pipeline-utility-steps
protected FileWrapper(@Nonnull FilePath file) throws IOException, InterruptedException {
this(file.getName(), file.getRemote(), file.isDirectory(), file.length(), file.lastModified());
}
代码示例来源:origin: jenkinsci/pipeline-utility-steps-plugin
protected FileWrapper(@Nonnull FilePath file) throws IOException, InterruptedException {
this(file.getName(), file.getRemote(), file.isDirectory(), file.length(), file.lastModified());
}
代码示例来源:origin: jenkinsci/email-ext-plugin
&& totalAttachmentSize + file.length() >= maxAttachmentSize) {
context.getListener().getLogger().println("Skipping `" + file.getName()
+ "' (" + file.length()
+ " bytes) - too large for maximum attachments size");
continue;
attachmentPart.setContentID(String.format("<%s>", file.getName()));
attachments.add(attachmentPart);
totalAttachmentSize += file.length();
} catch (MessagingException e) {
context.getListener().getLogger().println("Error adding `"
代码示例来源:origin: jenkinsci/jclouds-plugin
.payload(dis).contentLength(filePath.length()).build();
blobStore.putBlob(container, blob);
bsc.close();
代码示例来源:origin: org.jenkins-ci.plugins/s3
public ObjectMetadata buildMetadata(FilePath filePath) throws IOException, InterruptedException {
ObjectMetadata metadata = new ObjectMetadata();
metadata.setContentType(Mimetypes.getInstance().getMimetype(filePath.getName()));
metadata.setContentLength(filePath.length());
metadata.setLastModified(new Date(filePath.lastModified()));
if ((storageClass != null) && !"".equals(storageClass)) {
metadata.setHeader("x-amz-storage-class", storageClass);
}
if (useServerSideEncryption) {
metadata.setServerSideEncryption(ObjectMetadata.AES_256_SERVER_SIDE_ENCRYPTION);
}
for (MetadataPair metadataPair : userMetadata) {
metadata.addUserMetadata(metadataPair.key, metadataPair.value);
}
return metadata;
}
代码示例来源:origin: fit2cloud/aliyun-oss-plugin
try {
ObjectMetadata meta = new ObjectMetadata();
meta.setContentLength(src.length());
meta.setContentType(getContentType(src));
listener.getLogger().println("File: " + src.getName() + ", Content Type: " + meta.getContentType());
代码示例来源:origin: awslabs/aws-codebuild-jenkins-plugin
objectMetadata.setContentLength(jenkinsZipFile.length());
if(!sseAlgorithm.isEmpty()) {
objectMetadata.setSSEAlgorithm(ObjectMetadata.AES_256_SERVER_SIDE_ENCRYPTION);
代码示例来源:origin: jenkinsci/android-emulator-plugin
if (logcatFile.length() != 0 && artifactManager != null && launcher != null && listener != null) {
log(emu.logger(), Messages.ARCHIVING_LOG());
final FilePath workspace = logcatFile.getParent();
内容来源于网络,如有侵权,请联系作者删除!