gpt4 book ai didi

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

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

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

ZLFile.createFileByPath介绍

暂无

代码示例

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

public static ZLFile createFileByUrl(String url) {
  if (url == null || !url.startsWith("file://")) {
    return null;
  }
  return createFileByPath(url.substring("file://".length()));
}

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

public static ZLFile createFileByUrl(String url) {
  if (url == null || !url.startsWith("file://")) {
    return null;
  }
  return createFileByPath(url.substring("file://".length()));
}

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

static ZLFile fileFromEncodedPath(String encodedPath) {
  final StringBuilder path = new StringBuilder();
  for (String item : encodedPath.split("X")) {
    if (item.length() == 0) {
      continue;
    }
    path.append((char) Short.parseShort(item, 16));
  }
  return ZLFile.createFileByPath(path.toString());
}

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

static ZLFile fileFromEncodedPath(String encodedPath) {
  final StringBuilder path = new StringBuilder();
  for (String item : encodedPath.split("X")) {
    if (item.length() == 0) {
      continue;
    }
    path.append((char) Short.parseShort(item, 16));
  }
  return ZLFile.createFileByPath(path.toString());
}

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

private void addChild(String path, String title, String summary) {
  final ZLFile file = ZLFile.createFileByPath(path);
  if (file != null) {
    new FileTree(this, file, title, summary);
  }
}

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

private void addChild(String path, String title, String summary) {
  final ZLFile file = ZLFile.createFileByPath(path);
  if (file != null) {
    new FileTree(this, file, title, summary);
  }
}

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

public static ZLFile fileByBook(AbstractBook book) {
    if (book instanceof DbBook) {
      return ((DbBook)book).File;
    } else {
      return ZLFile.createFileByPath(book.getPath());
    }
  }
}

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

public static ZLFile fileByBook(AbstractBook book) {
    if (book instanceof DbBook) {
      return ((DbBook)book).File;
    } else {
      return ZLFile.createFileByPath(book.getPath());
    }
  }
}

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

public DbBook getBookByFile(String path) {
  return getBookByFile(ZLFile.createFileByPath(path));
}

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

public DbBook getBookByFile(String path) {
  return getBookByFile(ZLFile.createFileByPath(path));
}

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

public static ZLImage getCover(AbstractBook book, IFormatPluginCollection collection) {
  if (book == null) {
    return null;
  }
  synchronized (book) {
    return getCover(ZLFile.createFileByPath(book.getPath()), collection);
  }
}

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

public static ZLImage getCover(AbstractBook book, IFormatPluginCollection collection) {
  if (book == null) {
    return null;
  }
  synchronized (book) {
    return getCover(ZLFile.createFileByPath(book.getPath()), collection);
  }
}

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

public void readQuietly(String path) {
  LogInfo.i("application");
  XmlUtil.parseQuietly(ZLFile.createFileByPath(path), this);
}

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

private void updateTables4() {
  final FileInfoSet fileInfos = new FileInfoSet(this);
  final Cursor cursor = myDatabase.rawQuery(
      "SELECT file_name FROM Books", null
  );
  while (cursor.moveToNext()) {
    fileInfos.check(ZLFile.createFileByPath(cursor.getString(0)).getPhysicalFile(), false);
  }
  cursor.close();
  fileInfos.save();
  myDatabase.execSQL(
      "CREATE TABLE IF NOT EXISTS RecentBooks(" +
          "book_index INTEGER PRIMARY KEY," +
          "book_id INTEGER REFERENCES Books(book_id))");
}

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

public void readQuietly(String path) {
  LogInfo.i("application");
  XmlUtil.parseQuietly(ZLFile.createFileByPath(path), this);
}

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

private void updateTables4() {
  final FileInfoSet fileInfos = new FileInfoSet(this);
  final Cursor cursor = myDatabase.rawQuery(
      "SELECT file_name FROM Books", null
  );
  while (cursor.moveToNext()) {
    fileInfos.check(ZLFile.createFileByPath(cursor.getString(0)).getPhysicalFile(), false);
  }
  cursor.close();
  fileInfos.save();
  myDatabase.execSQL(
      "CREATE TABLE IF NOT EXISTS RecentBooks(" +
          "book_index INTEGER PRIMARY KEY," +
          "book_id INTEGER REFERENCES Books(book_id))");
}

代码示例来源: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

private TapZoneMap(String name) {
  Name = name;
  myOptionGroupName = "TapZones:" + name;
  myHeight = new ZLIntegerRangeOption(myOptionGroupName, "Height", 2, 5, 3);
  myWidth = new ZLIntegerRangeOption(myOptionGroupName, "Width", 2, 5, 3);
  final ZLFile mapFile = ZLFile.createFileByPath(
    "default/tapzones/" + name.toLowerCase() + ".xml"
  );
  XmlUtil.parseQuietly(mapFile, new Reader());
}

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

private TapZoneMap(String name) {
  Name = name;
  myOptionGroupName = "TapZones:" + name;
  myHeight = new ZLIntegerRangeOption(myOptionGroupName, "Height", 2, 5, 3);
  myWidth = new ZLIntegerRangeOption(myOptionGroupName, "Width", 2, 5, 3);
  final ZLFile mapFile = ZLFile.createFileByPath(
    "default/tapzones/" + name.toLowerCase() + ".xml"
  );
  XmlUtil.parseQuietly(mapFile, new Reader());
}

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