gpt4 book ai didi

com.koolearn.klibrary.core.filesystem.ZLFile.exists()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-13 12:15:14 27 4
gpt4 key购买 nike

本文整理了Java中com.koolearn.klibrary.core.filesystem.ZLFile.exists()方法的一些代码示例,展示了ZLFile.exists()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZLFile.exists()方法的具体详情如下:
包路径:com.koolearn.klibrary.core.filesystem.ZLFile
类名称:ZLFile
方法名:exists

ZLFile.exists介绍

暂无

代码示例

代码示例来源:origin: ydcx/KooReader

@Override
public boolean exists() {
  // TODO: optimize
  return myParent.exists() && archiveEntries(myParent).contains(this);
}

代码示例来源:origin: Jiangzqts/EpubRead

@Override
public boolean exists() {
  // TODO: optimize
  return myParent.exists() && archiveEntries(myParent).contains(this);
}

代码示例来源:origin: ydcx/KooReader

@Override
public boolean exists() {
  try {
    return myParent.exists() && getZipFile(myParent).entryExists(myName);
  } catch (IOException e) {
    return false;
  }
}

代码示例来源:origin: Jiangzqts/EpubRead

@Override
public boolean exists() {
  try {
    return myParent.exists() && getZipFile(myParent).entryExists(myName);
  } catch (IOException e) {
    return false;
  }
}

代码示例来源:origin: ydcx/KooReader

@Override
public ZLFile getWallpaperFile() {
  final String filePath = myViewOptions.getColorProfile().WallpaperOption.getValue();
  if ("".equals(filePath)) {
    return null;
  }
  final ZLFile file = ZLFile.createFileByPath(filePath);
  if (file == null || !file.exists()) {
    return null;
  }
  return file;
}

代码示例来源:origin: Jiangzqts/EpubRead

@Override
public ZLFile getWallpaperFile() {
  final String filePath = myViewOptions.getColorProfile().WallpaperOption.getValue();
  if ("".equals(filePath)) {
    return null;
  }
  final ZLFile file = ZLFile.createFileByPath(filePath);
  if (file == null || !file.exists()) {
    return null;
  }
  return file;
}

代码示例来源:origin: ydcx/KooReader

public final List<ZLFile> children() {
  if (exists()) {
    if (isDirectory()) {
      return directoryEntries();
    } else if (isArchive()) {
      return ZLArchiveEntryFile.archiveEntries(this);
    }
  }
  return Collections.emptyList();
}

代码示例来源:origin: ydcx/KooReader

public DbBook getBookByHash(String hash) {
  if (ZERO_HASH.equals(hash)) {
    return getBookByFile(BookUtil.getHelpFile());
  }
  for (long id : myDatabase.bookIdsByHash(hash)) {
    final DbBook book = getBookById(id);
    if (book != null && book.File.exists()) {
      return book;
    }
  }
  return null;
}

代码示例来源:origin: Jiangzqts/EpubRead

public final List<ZLFile> children() {
  if (exists()) {
    if (isDirectory()) {
      return directoryEntries();
    } else if (isArchive()) {
      return ZLArchiveEntryFile.archiveEntries(this);
    }
  }
  return Collections.emptyList();
}

代码示例来源:origin: Jiangzqts/EpubRead

public DbBook getBookByHash(String hash) {
  if (ZERO_HASH.equals(hash)) {
    return getBookByFile(BookUtil.getHelpFile());
  }
  for (long id : myDatabase.bookIdsByHash(hash)) {
    final DbBook book = getBookById(id);
    if (book != null && book.File.exists()) {
      return book;
    }
  }
  return null;
}

代码示例来源:origin: Jiangzqts/EpubRead

private synchronized void openBook(Intent intent, final Runnable action, boolean force) {
  if (!force && myBook != null) {
    return;
  }
  myBook = KooReaderIntents.getBookExtra(intent, myKooReaderApp.Collection);
  if (myBook == null) {
    final Uri data = intent.getData();
    if (data != null) {
      myBook = createBookForFile(ZLFile.createFileByPath(data.getPath()));
    }
  }
  if (myBook != null) {
    ZLFile file = BookUtil.fileByBook(myBook);
    if (!file.exists()) {
      if (file.getPhysicalFile() != null) {
        file = file.getPhysicalFile();
      }
      UIMessageUtil.showErrorMessage(this, "fileNotFound", file.getPath());
      myBook = null;
    } else {
    }
  }
  Config.Instance().runOnConnect(new Runnable() {
    public void run() {
      myKooReaderApp.openBook(myBook, myBookmark, action); // UIUtil
      AndroidFontUtil.clearFontCache();
    }
  });
}

代码示例来源:origin: ydcx/KooReader

private synchronized void openBook(Intent intent, final Runnable action, boolean force) {
  if (!force && myBook != null) {
    return;
  }
  myBook = KooReaderIntents.getBookExtra(intent, myKooReaderApp.Collection);
  final Bookmark bookmark = KooReaderIntents.getBookmarkExtra(intent);
  if (myBook == null) {
    final Uri data = intent.getData();
    if (data != null) {
      myBook = createBookForFile(ZLFile.createFileByPath(data.getPath()));
    }
  }
  if (myBook != null) {
    ZLFile file = BookUtil.fileByBook(myBook);
    if (!file.exists()) {
      if (file.getPhysicalFile() != null) {
        file = file.getPhysicalFile();
      }
      UIMessageUtil.showErrorMessage(this, "fileNotFound", file.getPath());
      myBook = null;
    } else {
    }
  }
  Config.Instance().runOnConnect(new Runnable() {
    public void run() {
      myKooReaderApp.openBook(myBook, bookmark, action); // UIUtil
      AndroidFontUtil.clearFontCache();
    }
  });
}

代码示例来源:origin: Jiangzqts/EpubRead

if (book.File.exists()) {
  boolean doAdd = true;
  if (file == null) {

代码示例来源:origin: ydcx/KooReader

if (book.File.exists()) {
  boolean doAdd = true;
  if (file == null) {

代码示例来源:origin: ydcx/KooReader

if (book == null || book.File == null || !book.File.exists() || !isBookFormatActive(book)) {
  return null;

代码示例来源:origin: Jiangzqts/EpubRead

if (book == null || book.File == null || !book.File.exists() || !isBookFormatActive(book)) {
  return null;

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com