IS_WRITABLE is path writable

Contents

Inputs

Outputs

this method is like 40x faster than native

function y = is_writable(file)

a = file_attributes(file);

if isempty(a)
  y = false;
else
  y = a.UserWrite || a.GroupWrite || a.OtherWrite;
end

end

%!assert (islogical(stdlib.is_writable('.')))