本文整理了Java中java.io.File.doChmod()
方法的一些代码示例,展示了File.doChmod()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。File.doChmod()
方法的具体详情如下:
包路径:java.io.File
类名称:File
方法名:doChmod
暂无
代码示例来源:origin: robovm/robovm
/**
* Manipulates the write permissions for the abstract path designated by this
* file.
*
* @param writable
* To allow write permission if true, otherwise disallow
* @param ownerOnly
* To manipulate write permission only for owner if true,
* otherwise for everyone. The manipulation will apply to
* everyone regardless of this value if the underlying system
* does not distinguish owner and other users.
* @return true if and only if the operation succeeded. If the user does not
* have permission to change the access permissions of this abstract
* pathname the operation will fail.
* @since 1.6
*/
public boolean setWritable(boolean writable, boolean ownerOnly) {
return doChmod(ownerOnly ? S_IWUSR : (S_IWUSR | S_IWGRP | S_IWOTH), writable);
}
代码示例来源:origin: robovm/robovm
/**
* Manipulates the read permissions for the abstract path designated by this
* file.
*
* @param readable
* To allow read permission if true, otherwise disallow
* @param ownerOnly
* To manipulate read permission only for owner if true,
* otherwise for everyone. The manipulation will apply to
* everyone regardless of this value if the underlying system
* does not distinguish owner and other users.
* @return true if and only if the operation succeeded. If the user does not
* have permission to change the access permissions of this abstract
* pathname the operation will fail. If the underlying file system
* does not support read permission and the value of readable is
* false, this operation will fail.
* @since 1.6
*/
public boolean setReadable(boolean readable, boolean ownerOnly) {
return doChmod(ownerOnly ? S_IRUSR : (S_IRUSR | S_IRGRP | S_IROTH), readable);
}
代码示例来源:origin: robovm/robovm
/**
* Manipulates the execute permissions for the abstract path designated by
* this file.
*
* <p>Note that this method does <i>not</i> throw {@code IOException} on failure.
* Callers must check the return value.
*
* @param executable
* To allow execute permission if true, otherwise disallow
* @param ownerOnly
* To manipulate execute permission only for owner if true,
* otherwise for everyone. The manipulation will apply to
* everyone regardless of this value if the underlying system
* does not distinguish owner and other users.
* @return true if and only if the operation succeeded. If the user does not
* have permission to change the access permissions of this abstract
* pathname the operation will fail. If the underlying file system
* does not support execute permission and the value of executable
* is false, this operation will fail.
* @since 1.6
*/
public boolean setExecutable(boolean executable, boolean ownerOnly) {
return doChmod(ownerOnly ? S_IXUSR : (S_IXUSR | S_IXGRP | S_IXOTH), executable);
}
代码示例来源:origin: MobiVM/robovm
/**
* Manipulates the write permissions for the abstract path designated by this
* file.
*
* @param writable
* To allow write permission if true, otherwise disallow
* @param ownerOnly
* To manipulate write permission only for owner if true,
* otherwise for everyone. The manipulation will apply to
* everyone regardless of this value if the underlying system
* does not distinguish owner and other users.
* @return true if and only if the operation succeeded. If the user does not
* have permission to change the access permissions of this abstract
* pathname the operation will fail.
* @since 1.6
*/
public boolean setWritable(boolean writable, boolean ownerOnly) {
return doChmod(ownerOnly ? S_IWUSR : (S_IWUSR | S_IWGRP | S_IWOTH), writable);
}
代码示例来源:origin: ibinti/bugvm
/**
* Manipulates the write permissions for the abstract path designated by this
* file.
*
* @param writable
* To allow write permission if true, otherwise disallow
* @param ownerOnly
* To manipulate write permission only for owner if true,
* otherwise for everyone. The manipulation will apply to
* everyone regardless of this value if the underlying system
* does not distinguish owner and other users.
* @return true if and only if the operation succeeded. If the user does not
* have permission to change the access permissions of this abstract
* pathname the operation will fail.
* @since 1.6
*/
public boolean setWritable(boolean writable, boolean ownerOnly) {
return doChmod(ownerOnly ? S_IWUSR : (S_IWUSR | S_IWGRP | S_IWOTH), writable);
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
/**
* Manipulates the write permissions for the abstract path designated by this
* file.
*
* @param writable
* To allow write permission if true, otherwise disallow
* @param ownerOnly
* To manipulate write permission only for owner if true,
* otherwise for everyone. The manipulation will apply to
* everyone regardless of this value if the underlying system
* does not distinguish owner and other users.
* @return true if and only if the operation succeeded. If the user does not
* have permission to change the access permissions of this abstract
* pathname the operation will fail.
* @since 1.6
*/
public boolean setWritable(boolean writable, boolean ownerOnly) {
return doChmod(ownerOnly ? S_IWUSR : (S_IWUSR | S_IWGRP | S_IWOTH), writable);
}
代码示例来源:origin: com.bugvm/bugvm-rt
/**
* Manipulates the write permissions for the abstract path designated by this
* file.
*
* @param writable
* To allow write permission if true, otherwise disallow
* @param ownerOnly
* To manipulate write permission only for owner if true,
* otherwise for everyone. The manipulation will apply to
* everyone regardless of this value if the underlying system
* does not distinguish owner and other users.
* @return true if and only if the operation succeeded. If the user does not
* have permission to change the access permissions of this abstract
* pathname the operation will fail.
* @since 1.6
*/
public boolean setWritable(boolean writable, boolean ownerOnly) {
return doChmod(ownerOnly ? S_IWUSR : (S_IWUSR | S_IWGRP | S_IWOTH), writable);
}
代码示例来源:origin: com.gluonhq/robovm-rt
/**
* Manipulates the write permissions for the abstract path designated by this
* file.
*
* @param writable
* To allow write permission if true, otherwise disallow
* @param ownerOnly
* To manipulate write permission only for owner if true,
* otherwise for everyone. The manipulation will apply to
* everyone regardless of this value if the underlying system
* does not distinguish owner and other users.
* @return true if and only if the operation succeeded. If the user does not
* have permission to change the access permissions of this abstract
* pathname the operation will fail.
* @since 1.6
*/
public boolean setWritable(boolean writable, boolean ownerOnly) {
return doChmod(ownerOnly ? S_IWUSR : (S_IWUSR | S_IWGRP | S_IWOTH), writable);
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
/**
* Manipulates the read permissions for the abstract path designated by this
* file.
*
* @param readable
* To allow read permission if true, otherwise disallow
* @param ownerOnly
* To manipulate read permission only for owner if true,
* otherwise for everyone. The manipulation will apply to
* everyone regardless of this value if the underlying system
* does not distinguish owner and other users.
* @return true if and only if the operation succeeded. If the user does not
* have permission to change the access permissions of this abstract
* pathname the operation will fail. If the underlying file system
* does not support read permission and the value of readable is
* false, this operation will fail.
* @since 1.6
*/
public boolean setReadable(boolean readable, boolean ownerOnly) {
return doChmod(ownerOnly ? S_IRUSR : (S_IRUSR | S_IRGRP | S_IROTH), readable);
}
代码示例来源:origin: ibinti/bugvm
/**
* Manipulates the read permissions for the abstract path designated by this
* file.
*
* @param readable
* To allow read permission if true, otherwise disallow
* @param ownerOnly
* To manipulate read permission only for owner if true,
* otherwise for everyone. The manipulation will apply to
* everyone regardless of this value if the underlying system
* does not distinguish owner and other users.
* @return true if and only if the operation succeeded. If the user does not
* have permission to change the access permissions of this abstract
* pathname the operation will fail. If the underlying file system
* does not support read permission and the value of readable is
* false, this operation will fail.
* @since 1.6
*/
public boolean setReadable(boolean readable, boolean ownerOnly) {
return doChmod(ownerOnly ? S_IRUSR : (S_IRUSR | S_IRGRP | S_IROTH), readable);
}
代码示例来源:origin: FlexoVM/flexovm
/**
* Manipulates the write permissions for the abstract path designated by this
* file.
*
* @param writable
* To allow write permission if true, otherwise disallow
* @param ownerOnly
* To manipulate write permission only for owner if true,
* otherwise for everyone. The manipulation will apply to
* everyone regardless of this value if the underlying system
* does not distinguish owner and other users.
* @return true if and only if the operation succeeded. If the user does not
* have permission to change the access permissions of this abstract
* pathname the operation will fail.
* @since 1.6
*/
public boolean setWritable(boolean writable, boolean ownerOnly) {
return doChmod(ownerOnly ? S_IWUSR : (S_IWUSR | S_IWGRP | S_IWOTH), writable);
}
代码示例来源:origin: MobiVM/robovm
/**
* Manipulates the read permissions for the abstract path designated by this
* file.
*
* @param readable
* To allow read permission if true, otherwise disallow
* @param ownerOnly
* To manipulate read permission only for owner if true,
* otherwise for everyone. The manipulation will apply to
* everyone regardless of this value if the underlying system
* does not distinguish owner and other users.
* @return true if and only if the operation succeeded. If the user does not
* have permission to change the access permissions of this abstract
* pathname the operation will fail. If the underlying file system
* does not support read permission and the value of readable is
* false, this operation will fail.
* @since 1.6
*/
public boolean setReadable(boolean readable, boolean ownerOnly) {
return doChmod(ownerOnly ? S_IRUSR : (S_IRUSR | S_IRGRP | S_IROTH), readable);
}
代码示例来源:origin: com.bugvm/bugvm-rt
/**
* Manipulates the read permissions for the abstract path designated by this
* file.
*
* @param readable
* To allow read permission if true, otherwise disallow
* @param ownerOnly
* To manipulate read permission only for owner if true,
* otherwise for everyone. The manipulation will apply to
* everyone regardless of this value if the underlying system
* does not distinguish owner and other users.
* @return true if and only if the operation succeeded. If the user does not
* have permission to change the access permissions of this abstract
* pathname the operation will fail. If the underlying file system
* does not support read permission and the value of readable is
* false, this operation will fail.
* @since 1.6
*/
public boolean setReadable(boolean readable, boolean ownerOnly) {
return doChmod(ownerOnly ? S_IRUSR : (S_IRUSR | S_IRGRP | S_IROTH), readable);
}
代码示例来源:origin: com.gluonhq/robovm-rt
/**
* Manipulates the read permissions for the abstract path designated by this
* file.
*
* @param readable
* To allow read permission if true, otherwise disallow
* @param ownerOnly
* To manipulate read permission only for owner if true,
* otherwise for everyone. The manipulation will apply to
* everyone regardless of this value if the underlying system
* does not distinguish owner and other users.
* @return true if and only if the operation succeeded. If the user does not
* have permission to change the access permissions of this abstract
* pathname the operation will fail. If the underlying file system
* does not support read permission and the value of readable is
* false, this operation will fail.
* @since 1.6
*/
public boolean setReadable(boolean readable, boolean ownerOnly) {
return doChmod(ownerOnly ? S_IRUSR : (S_IRUSR | S_IRGRP | S_IROTH), readable);
}
代码示例来源:origin: MobiVM/robovm
/**
* Manipulates the execute permissions for the abstract path designated by
* this file.
*
* <p>Note that this method does <i>not</i> throw {@code IOException} on failure.
* Callers must check the return value.
*
* @param executable
* To allow execute permission if true, otherwise disallow
* @param ownerOnly
* To manipulate execute permission only for owner if true,
* otherwise for everyone. The manipulation will apply to
* everyone regardless of this value if the underlying system
* does not distinguish owner and other users.
* @return true if and only if the operation succeeded. If the user does not
* have permission to change the access permissions of this abstract
* pathname the operation will fail. If the underlying file system
* does not support execute permission and the value of executable
* is false, this operation will fail.
* @since 1.6
*/
public boolean setExecutable(boolean executable, boolean ownerOnly) {
return doChmod(ownerOnly ? S_IXUSR : (S_IXUSR | S_IXGRP | S_IXOTH), executable);
}
代码示例来源:origin: com.gluonhq/robovm-rt
/**
* Manipulates the execute permissions for the abstract path designated by
* this file.
*
* <p>Note that this method does <i>not</i> throw {@code IOException} on failure.
* Callers must check the return value.
*
* @param executable
* To allow execute permission if true, otherwise disallow
* @param ownerOnly
* To manipulate execute permission only for owner if true,
* otherwise for everyone. The manipulation will apply to
* everyone regardless of this value if the underlying system
* does not distinguish owner and other users.
* @return true if and only if the operation succeeded. If the user does not
* have permission to change the access permissions of this abstract
* pathname the operation will fail. If the underlying file system
* does not support execute permission and the value of executable
* is false, this operation will fail.
* @since 1.6
*/
public boolean setExecutable(boolean executable, boolean ownerOnly) {
return doChmod(ownerOnly ? S_IXUSR : (S_IXUSR | S_IXGRP | S_IXOTH), executable);
}
代码示例来源:origin: ibinti/bugvm
/**
* Manipulates the execute permissions for the abstract path designated by
* this file.
*
* <p>Note that this method does <i>not</i> throw {@code IOException} on failure.
* Callers must check the return value.
*
* @param executable
* To allow execute permission if true, otherwise disallow
* @param ownerOnly
* To manipulate execute permission only for owner if true,
* otherwise for everyone. The manipulation will apply to
* everyone regardless of this value if the underlying system
* does not distinguish owner and other users.
* @return true if and only if the operation succeeded. If the user does not
* have permission to change the access permissions of this abstract
* pathname the operation will fail. If the underlying file system
* does not support execute permission and the value of executable
* is false, this operation will fail.
* @since 1.6
*/
public boolean setExecutable(boolean executable, boolean ownerOnly) {
return doChmod(ownerOnly ? S_IXUSR : (S_IXUSR | S_IXGRP | S_IXOTH), executable);
}
代码示例来源:origin: FlexoVM/flexovm
/**
* Manipulates the read permissions for the abstract path designated by this
* file.
*
* @param readable
* To allow read permission if true, otherwise disallow
* @param ownerOnly
* To manipulate read permission only for owner if true,
* otherwise for everyone. The manipulation will apply to
* everyone regardless of this value if the underlying system
* does not distinguish owner and other users.
* @return true if and only if the operation succeeded. If the user does not
* have permission to change the access permissions of this abstract
* pathname the operation will fail. If the underlying file system
* does not support read permission and the value of readable is
* false, this operation will fail.
* @since 1.6
*/
public boolean setReadable(boolean readable, boolean ownerOnly) {
return doChmod(ownerOnly ? S_IRUSR : (S_IRUSR | S_IRGRP | S_IROTH), readable);
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
/**
* Manipulates the execute permissions for the abstract path designated by
* this file.
*
* <p>Note that this method does <i>not</i> throw {@code IOException} on failure.
* Callers must check the return value.
*
* @param executable
* To allow execute permission if true, otherwise disallow
* @param ownerOnly
* To manipulate execute permission only for owner if true,
* otherwise for everyone. The manipulation will apply to
* everyone regardless of this value if the underlying system
* does not distinguish owner and other users.
* @return true if and only if the operation succeeded. If the user does not
* have permission to change the access permissions of this abstract
* pathname the operation will fail. If the underlying file system
* does not support execute permission and the value of executable
* is false, this operation will fail.
* @since 1.6
*/
public boolean setExecutable(boolean executable, boolean ownerOnly) {
return doChmod(ownerOnly ? S_IXUSR : (S_IXUSR | S_IXGRP | S_IXOTH), executable);
}
代码示例来源:origin: com.bugvm/bugvm-rt
/**
* Manipulates the execute permissions for the abstract path designated by
* this file.
*
* <p>Note that this method does <i>not</i> throw {@code IOException} on failure.
* Callers must check the return value.
*
* @param executable
* To allow execute permission if true, otherwise disallow
* @param ownerOnly
* To manipulate execute permission only for owner if true,
* otherwise for everyone. The manipulation will apply to
* everyone regardless of this value if the underlying system
* does not distinguish owner and other users.
* @return true if and only if the operation succeeded. If the user does not
* have permission to change the access permissions of this abstract
* pathname the operation will fail. If the underlying file system
* does not support execute permission and the value of executable
* is false, this operation will fail.
* @since 1.6
*/
public boolean setExecutable(boolean executable, boolean ownerOnly) {
return doChmod(ownerOnly ? S_IXUSR : (S_IXUSR | S_IXGRP | S_IXOTH), executable);
}
内容来源于网络,如有侵权,请联系作者删除!