Tabnine Logo
FileInfo.isFolder
Code IndexAdd Tabnine to your IDE (free)

How to use
isFolder
method
in
alluxio.wire.FileInfo

Best Java code snippets using alluxio.wire.FileInfo.isFolder (Showing top 10 results out of 315)

origin: Alluxio/alluxio

/**
 * @return whether the entity referenced by this uri is a directory, immutable
 */
// TODO(calvin): Consider consolidating the terms directory and folder
public boolean isFolder() {
 return mInfo.isFolder();
}
origin: Alluxio/alluxio

 private void assertFileInfoEqualsFileStatus(FileInfo info, FileStatus status) {
  assertEquals(info.getOwner(), status.getOwner());
  assertEquals(info.getGroup(), status.getGroup());
  assertEquals(info.getMode(), status.getPermission().toShort());
  assertEquals(info.getLastModificationTimeMs(), status.getModificationTime());
  assertEquals(info.isFolder(), status.isDir());
 }
}
origin: Alluxio/alluxio

AlluxioURI uri = inodePath.getUri();
FileInfo fileInfo = inode.generateClientFileInfo(uri.toString());
if (fileInfo.isFolder()) {
 fileInfo.setLength(inode.asDirectory().getChildCount());
origin: Alluxio/alluxio

private void verifyCreateDirectory(TestUser user, String path, boolean recursive)
  throws Exception {
 try (Closeable r = new AuthenticatedUserRule(user.getUser(),
   ServerConfiguration.global()).toResource()) {
  CreateDirectoryContext context = CreateDirectoryContext
    .defaults(CreateDirectoryPOptions.newBuilder().setRecursive(recursive))
    .setOwner(SecurityUtils.getOwnerFromGrpcClient(ServerConfiguration.global()))
    .setGroup(SecurityUtils.getGroupFromGrpcClient(ServerConfiguration.global()));
  mFileSystemMaster.createDirectory(new AlluxioURI(path), context);
  FileInfo fileInfo =
    mFileSystemMaster.getFileInfo(mFileSystemMaster.getFileId(new AlluxioURI(path)));
  String[] pathComponents = path.split("/");
  assertEquals(pathComponents[pathComponents.length - 1], fileInfo.getName());
  assertEquals(true, fileInfo.isFolder());
  assertEquals(user.getUser(), fileInfo.getOwner());
 }
}
origin: Alluxio/alluxio

.setBlockSizeBytes(fileInfo.getBlockSizeBytes())
.setCreationTimeMs(fileInfo.getCreationTimeMs()).setCompleted(fileInfo.isCompleted())
.setFolder(fileInfo.isFolder()).setPinned(fileInfo.isPinned())
.setCacheable(fileInfo.isCacheable()).setPersisted(fileInfo.isPersisted())
.addAllBlockIds(fileInfo.getBlockIds())
origin: Alluxio/alluxio

 /**
  * Tests the {@link MutableInodeDirectory#generateClientFileInfo(String)} method.
  */
 @Test
 public void generateClientFileInfo() {
  MutableInodeDirectory inodeDirectory = createInodeDirectory();
  String path = "/test/path";
  FileInfo info = inodeDirectory.generateClientFileInfo(path);
  Assert.assertEquals(inodeDirectory.getId(), info.getFileId());
  Assert.assertEquals(inodeDirectory.getName(), info.getName());
  Assert.assertEquals(path, info.getPath());
  Assert.assertEquals("", info.getUfsPath());
  Assert.assertEquals(0, info.getLength());
  Assert.assertEquals(0, info.getBlockSizeBytes());
  Assert.assertEquals(inodeDirectory.getCreationTimeMs(), info.getCreationTimeMs());
  Assert.assertTrue(info.isCompleted());
  Assert.assertTrue(info.isFolder());
  Assert.assertEquals(inodeDirectory.isPinned(), info.isPinned());
  Assert.assertFalse(info.isCacheable());
  Assert.assertNotNull(info.getBlockIds());
  Assert.assertEquals(inodeDirectory.getLastModificationTimeMs(),
    info.getLastModificationTimeMs());
 }
}
origin: Alluxio/alluxio

Assert.assertEquals(a.isCacheable(), b.isCacheable());
Assert.assertEquals(a.isCompleted(), b.isCompleted());
Assert.assertEquals(a.isFolder(), b.isFolder());
Assert.assertEquals(a.isMountPoint(), b.isMountPoint());
Assert.assertEquals(a.isPersisted(), b.isPersisted());
origin: org.alluxio/alluxio-core-client-internal

/**
 * @return whether the entity referenced by this uri is a directory, immutable
 */
// TODO(calvin): Consider consolidating the terms directory and folder
public boolean isFolder() {
 return mInfo.isFolder();
}
origin: org.alluxio/alluxio-core-common

/**
 * @return whether the entity referenced by this uri is a directory, immutable
 */
// TODO(calvin): Consider consolidating the terms directory and folder
public boolean isFolder() {
 return mInfo.isFolder();
}
origin: Alluxio/alluxio

Assert.assertEquals(uriStatus.isCacheable(), fileInfo.isCacheable());
Assert.assertEquals(uriStatus.isCompleted(), fileInfo.isCompleted());
Assert.assertEquals(uriStatus.isFolder(), fileInfo.isFolder());
Assert.assertEquals(uriStatus.isPersisted(), fileInfo.isPersisted());
Assert.assertEquals(uriStatus.isPinned(), fileInfo.isPinned());
alluxio.wireFileInfoisFolder

Popular methods of FileInfo

  • <init>
    Creates a new instance of FileInfo.
  • getPath
  • setFileBlockInfos
  • getGroup
  • getLastModificationTimeMs
  • getLength
  • getMode
  • getName
  • getOwner
  • getUfsPath
  • isCompleted
  • setBlockIds
  • isCompleted,
  • setBlockIds,
  • setFolder,
  • setLength,
  • setPath,
  • getBlockIds,
  • getBlockSizeBytes,
  • getCreationTimeMs,
  • getFileId

Popular in Java

  • Finding current android device location
  • getExternalFilesDir (Context)
  • addToBackStack (FragmentTransaction)
  • scheduleAtFixedRate (Timer)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now