Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
Files.SetUserImmutable
Sets the user immutable flag.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Files | 14.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes, on macOS | ✅ Yes |
MBS( "Files.SetUserImmutable"; Path; Value ) More
Parameters
Parameter | Description | Example |
---|---|---|
Path | Native path to the file or directory. | "/System/Applications/Preview.app" |
Value | The new flag value. Pass 1 or 0. |
Result
Returns OK or error.
Description
Sets the user immutable flag.This is the lock checkbox in Finder's information window.
Examples
Clears the locked flag for a file:
Set Variable [ $r; Value: MBS( "Files.SetUserImmutable"; "/Users/cs/Desktop/test.rtf"; 0 ) ]
See also
Release notes
- Version 14.2
- Added Files.IsSystemImmutable, Files.IsUserImmutable, Files.SetSystemImmutable and Files.SetUserImmutable functions.
Blog Entries
This function checks for a license.
Created 18th April 2024, last changed 18th April 2024
