chmod method

Future<void> chmod(
  1. String path,
  2. int mode
)

Sets the POSIX mode on the node at path (files chmod).

Implementation

Future<void> chmod(String path, int mode) async {
  if (mode < 0 || mode > 0xFFFFFFFF) {
    throw ArgumentError('Invalid mode: $mode');
  }
  await _mutationLock.synchronized(() async {
    await _setMetadata(path, mode: mode);
  });
}