jnr.posix.POSIX.lstat()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(3.8k)|赞(0)|评价(0)|浏览(148)

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

POSIX.lstat介绍

暂无

代码示例

代码示例来源:origin: com.github.jnr/jnr-posix

  1. public FileStat lstat(String path) {
  2. try { return posix.lstat(path); } catch (UnsatisfiedLinkError ule) { return unimplementedNull(); }
  3. }

代码示例来源:origin: com.github.jnr/jnr-posix

  1. public int lstat(String path, FileStat stat) {
  2. return posix().lstat(path, stat);
  3. }

代码示例来源:origin: com.facebook.presto.cassandra/cassandra-driver

  1. public int lstat(String path, FileStat stat) {
  2. try { return posix.lstat(path, stat); } catch (UnsatisfiedLinkError ule) { return unimplementedInt(); }
  3. }

代码示例来源:origin: com.facebook.presto.cassandra/cassandra-driver

  1. public int lstat(String path, FileStat stat) {
  2. return posix().lstat(path, stat);
  3. }

代码示例来源:origin: com.github.jnr/jnr-posix

  1. public FileStat lstat(String path) {
  2. return posix().lstat(path);
  3. }

代码示例来源:origin: com.facebook.presto.cassandra/cassandra-driver

  1. public FileStat lstat(String path) {
  2. try { return posix.lstat(path); } catch (UnsatisfiedLinkError ule) { return unimplementedNull(); }
  3. }

代码示例来源:origin: io.prestosql.cassandra/cassandra-driver

  1. public int lstat(String path, FileStat stat) {
  2. return posix().lstat(path, stat);
  3. }

代码示例来源:origin: com.cloudbees.util/jnr-unixsocket-nodep

  1. public int lstat(String path, FileStat stat) {
  2. return posix().lstat(path, stat);
  3. }

代码示例来源:origin: com.github.jnr/jnr-posix

  1. public int lstat(String path, FileStat stat) {
  2. try { return posix.lstat(path, stat); } catch (UnsatisfiedLinkError ule) { return unimplementedInt(); }
  3. }

代码示例来源:origin: com.facebook.presto.cassandra/cassandra-driver

  1. public FileStat lstat(String path) {
  2. return posix().lstat(path);
  3. }

代码示例来源:origin: io.prestosql.cassandra/cassandra-driver

  1. public int lstat(String path, FileStat stat) {
  2. try { return posix.lstat(path, stat); } catch (UnsatisfiedLinkError ule) { return unimplementedInt(); }
  3. }

代码示例来源:origin: io.prestosql.cassandra/cassandra-driver

  1. public FileStat lstat(String path) {
  2. return posix().lstat(path);
  3. }

代码示例来源:origin: com.cloudbees.util/jnr-unixsocket-nodep

  1. public int lstat(String path, FileStat stat) {
  2. try { return posix.lstat(path, stat); } catch (UnsatisfiedLinkError ule) { return unimplementedInt(); }
  3. }

代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

  1. @Override
  2. public FileStat lstat(POSIX posix) {
  3. return posix.lstat(absolutePath());
  4. }

代码示例来源:origin: io.prestosql.cassandra/cassandra-driver

  1. public FileStat lstat(String path) {
  2. try { return posix.lstat(path); } catch (UnsatisfiedLinkError ule) { return unimplementedNull(); }
  3. }

代码示例来源:origin: com.cloudbees.util/jnr-unixsocket-nodep

  1. public FileStat lstat(String path) {
  2. try { return posix.lstat(path); } catch (UnsatisfiedLinkError ule) { return unimplementedNull(); }
  3. }

代码示例来源:origin: org.jruby/jruby-complete

  1. @Override
  2. public FileStat lstat() {
  3. FileStat stat = posix.allocateStat();
  4. return posix.lstat(file.getAbsolutePath(), stat) < 0 ? null : stat;
  5. }

代码示例来源:origin: org.jruby/jruby-core

  1. @Override
  2. public FileStat lstat() {
  3. FileStat stat = posix.allocateStat();
  4. return posix.lstat(file.getAbsolutePath(), stat) < 0 ? null : stat;
  5. }

代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

  1. @Override
  2. public boolean isSymLink() {
  3. try {
  4. return symlinkPosix.lstat(absolutePath()).isSymlink();
  5. } catch (Throwable t) {
  6. return false;
  7. }
  8. }

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

  1. @JRubyMethod(name = "symlink?", required = 1, module = true)
  2. public static RubyBoolean symlink_p(IRubyObject recv, IRubyObject filename) {
  3. Ruby runtime = recv.getRuntime();
  4. JRubyFile file = file(filename);
  5. try {
  6. // Note: We can't use file.exists() to check whether the symlink
  7. // exists or not, because that method returns false for existing
  8. // but broken symlink. So, we try without the existence check,
  9. // but in the try-catch block.
  10. // MRI behavior: symlink? on broken symlink should return true.
  11. return runtime.newBoolean(runtime.getPosix().lstat(file.getAbsolutePath()).isSymlink());
  12. } catch (SecurityException re) {
  13. return runtime.getFalse();
  14. } catch (RaiseException re) {
  15. return runtime.getFalse();
  16. }
  17. }

相关文章

POSIX类方法