public static bool AssignPermissionRecursively(string _directoryPath, FileAttributes _attribute) { #if IO_UNSUPPORTED_PLATFORM Debug.LogWarning("[IOExtensions] Not supported."); return(false); #else DirectoryInfo _directoryInfo = new DirectoryInfo(_directoryPath); if (!_directoryInfo.Exists) { Debug.LogWarning("[IOExtensions] The operation could not be completed because directory doesn't exist."); return(false); } return(_directoryInfo.AssignPermissionRecursively(_attribute)); #endif }