本文整理了Java中java.io.File.doAccess()
方法的一些代码示例,展示了File.doAccess()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。File.doAccess()
方法的具体详情如下:
包路径:java.io.File
类名称:File
方法名:doAccess
暂无
代码示例来源:origin: robovm/robovm
/**
* Indicates whether the current context is allowed to read from this file.
*
* @return {@code true} if this file can be read, {@code false} otherwise.
*/
public boolean canRead() {
return doAccess(R_OK);
}
代码示例来源:origin: robovm/robovm
/**
* Tests whether or not this process is allowed to execute this file.
* Note that this is a best-effort result; the only way to be certain is
* to actually attempt the operation.
*
* @return {@code true} if this file can be executed, {@code false} otherwise.
* @since 1.6
*/
public boolean canExecute() {
return doAccess(X_OK);
}
代码示例来源:origin: robovm/robovm
/**
* Returns a boolean indicating whether this file can be found on the
* underlying file system.
*
* @return {@code true} if this file exists, {@code false} otherwise.
*/
public boolean exists() {
return doAccess(F_OK);
}
代码示例来源:origin: robovm/robovm
/**
* Indicates whether the current context is allowed to write to this file.
*
* @return {@code true} if this file can be written, {@code false}
* otherwise.
*/
public boolean canWrite() {
return doAccess(W_OK);
}
代码示例来源:origin: ibinti/bugvm
/**
* Tests whether or not this process is allowed to execute this file.
* Note that this is a best-effort result; the only way to be certain is
* to actually attempt the operation.
*
* @return {@code true} if this file can be executed, {@code false} otherwise.
* @since 1.6
*/
public boolean canExecute() {
return doAccess(X_OK);
}
代码示例来源:origin: MobiVM/robovm
/**
* Tests whether or not this process is allowed to execute this file.
* Note that this is a best-effort result; the only way to be certain is
* to actually attempt the operation.
*
* @return {@code true} if this file can be executed, {@code false} otherwise.
* @since 1.6
*/
public boolean canExecute() {
return doAccess(X_OK);
}
代码示例来源:origin: MobiVM/robovm
/**
* Returns a boolean indicating whether this file can be found on the
* underlying file system.
*
* @return {@code true} if this file exists, {@code false} otherwise.
*/
public boolean exists() {
return doAccess(F_OK);
}
代码示例来源:origin: MobiVM/robovm
/**
* Indicates whether the current context is allowed to write to this file.
*
* @return {@code true} if this file can be written, {@code false}
* otherwise.
*/
public boolean canWrite() {
return doAccess(W_OK);
}
代码示例来源:origin: MobiVM/robovm
/**
* Indicates whether the current context is allowed to read from this file.
*
* @return {@code true} if this file can be read, {@code false} otherwise.
*/
public boolean canRead() {
return doAccess(R_OK);
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
/**
* Indicates whether the current context is allowed to read from this file.
*
* @return {@code true} if this file can be read, {@code false} otherwise.
*/
public boolean canRead() {
return doAccess(R_OK);
}
代码示例来源:origin: ibinti/bugvm
/**
* Indicates whether the current context is allowed to read from this file.
*
* @return {@code true} if this file can be read, {@code false} otherwise.
*/
public boolean canRead() {
return doAccess(R_OK);
}
代码示例来源:origin: ibinti/bugvm
/**
* Indicates whether the current context is allowed to write to this file.
*
* @return {@code true} if this file can be written, {@code false}
* otherwise.
*/
public boolean canWrite() {
return doAccess(W_OK);
}
代码示例来源:origin: ibinti/bugvm
/**
* Returns a boolean indicating whether this file can be found on the
* underlying file system.
*
* @return {@code true} if this file exists, {@code false} otherwise.
*/
public boolean exists() {
return doAccess(F_OK);
}
代码示例来源:origin: com.bugvm/bugvm-rt
/**
* Indicates whether the current context is allowed to write to this file.
*
* @return {@code true} if this file can be written, {@code false}
* otherwise.
*/
public boolean canWrite() {
return doAccess(W_OK);
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
/**
* Tests whether or not this process is allowed to execute this file.
* Note that this is a best-effort result; the only way to be certain is
* to actually attempt the operation.
*
* @return {@code true} if this file can be executed, {@code false} otherwise.
* @since 1.6
*/
public boolean canExecute() {
return doAccess(X_OK);
}
代码示例来源:origin: FlexoVM/flexovm
/**
* Tests whether or not this process is allowed to execute this file.
* Note that this is a best-effort result; the only way to be certain is
* to actually attempt the operation.
*
* @return {@code true} if this file can be executed, {@code false} otherwise.
* @since 1.6
*/
public boolean canExecute() {
return doAccess(X_OK);
}
代码示例来源:origin: com.bugvm/bugvm-rt
/**
* Indicates whether the current context is allowed to read from this file.
*
* @return {@code true} if this file can be read, {@code false} otherwise.
*/
public boolean canRead() {
return doAccess(R_OK);
}
代码示例来源:origin: com.gluonhq/robovm-rt
/**
* Indicates whether the current context is allowed to write to this file.
*
* @return {@code true} if this file can be written, {@code false}
* otherwise.
*/
public boolean canWrite() {
return doAccess(W_OK);
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
/**
* Indicates whether the current context is allowed to write to this file.
*
* @return {@code true} if this file can be written, {@code false}
* otherwise.
*/
public boolean canWrite() {
return doAccess(W_OK);
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
/**
* Returns a boolean indicating whether this file can be found on the
* underlying file system.
*
* @return {@code true} if this file exists, {@code false} otherwise.
*/
public boolean exists() {
return doAccess(F_OK);
}
内容来源于网络,如有侵权,请联系作者删除!