File.SetExecutable Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
SetExecutable(Boolean) |
A convenience method to set the owner's execute permission for this abstract pathname. |
SetExecutable(Boolean, Boolean) |
Sets the owner's or everybody's execute permission for this abstract pathname. |
SetExecutable(Boolean)
A convenience method to set the owner's execute permission for this abstract pathname.
[Android.Runtime.Register("setExecutable", "(Z)Z", "GetSetExecutable_ZHandler")]
public virtual bool SetExecutable (bool executable);
[<Android.Runtime.Register("setExecutable", "(Z)Z", "GetSetExecutable_ZHandler")>]
abstract member SetExecutable : bool -> bool
override this.SetExecutable : bool -> bool
Parameters
- executable
- Boolean
If true
, sets the access permission to allow execute
operations; if false
to disallow execute operations
Returns
true
if and only if the operation succeeded. The
operation will fail if the user does not have permission to
change the access permissions of this abstract pathname. If
executable
is false
and the underlying
file system does not implement an execute permission, then the
operation will fail.
- Attributes
Remarks
A convenience method to set the owner's execute permission for this abstract pathname.
An invocation of this method of the form file.setExcutable(arg)
behaves in exactly the same way as the invocation
file.setExecutable(arg, true)
Added in 1.6.
Java documentation for java.io.File.setExecutable(boolean)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
See also
- <xref:Java.IO.File.SetExecutable(System.Boolean%2c+System.Boolean)>
Applies to
SetExecutable(Boolean, Boolean)
Sets the owner's or everybody's execute permission for this abstract pathname.
[Android.Runtime.Register("setExecutable", "(ZZ)Z", "GetSetExecutable_ZZHandler")]
public virtual bool SetExecutable (bool executable, bool ownerOnly);
[<Android.Runtime.Register("setExecutable", "(ZZ)Z", "GetSetExecutable_ZZHandler")>]
abstract member SetExecutable : bool * bool -> bool
override this.SetExecutable : bool * bool -> bool
Parameters
- executable
- Boolean
If true
, sets the access permission to allow execute
operations; if false
to disallow execute operations
- ownerOnly
- Boolean
If true
, the execute permission applies only to the
owner's execute permission; otherwise, it applies to everybody.
If the underlying file system can not distinguish the owner's
execute permission from that of others, then the permission will
apply to everybody, regardless of this value.
Returns
true
if and only if the operation succeeded. The
operation will fail if the user does not have permission to
change the access permissions of this abstract pathname. If
executable
is false
and the underlying
file system does not implement an execute permission, then the
operation will fail.
- Attributes
Remarks
Sets the owner's or everybody's execute permission for this abstract pathname.
The java.nio.file.Files
class defines methods that operate on file attributes including file permissions. This may be used when finer manipulation of file permissions is required.
Added in 1.6.
Java documentation for java.io.File.setExecutable(boolean, boolean)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.