public abstract class File extends Object implements ContentTreeNode
ContentTreeNode.Type| Constructor and Description |
|---|
File() |
| Modifier and Type | Method and Description |
|---|---|
abstract OptionalLong |
getSize()
Retrieves the size of the file, if sizes were requested.
|
ContentTreeNode.Type |
getType() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetContentId, getPath@Nonnull public abstract OptionalLong getSize()
For performance reasons, file sizes are not retrieved by default. If they are requested, the returned
OptionalLong will be set with the file's size. Otherwise, it will be empty().
When using ContentService.streamDirectory(com.atlassian.bitbucket.repository.Repository, java.lang.String, java.lang.String, boolean, com.atlassian.bitbucket.content.ContentTreeCallback, com.atlassian.bitbucket.util.PageRequest), file sizes will be returned for non-recursive
requests. When using ScmCommandFactory.directory(com.atlassian.bitbucket.scm.DirectoryCommandParameters, com.atlassian.bitbucket.content.ContentTreeCallback, com.atlassian.bitbucket.util.PageRequest) directly, file sizes can be requested or not
by setting DirectoryCommandParameters.Builder.withSizes(boolean).
empty()@Nonnull public ContentTreeNode.Type getType()
getType in interface ContentTreeNodeType#FILECopyright © 2019 Atlassian. All rights reserved.