Determine which os the jvm is running on
@return 	the os specific list of native files to load
774649
public static List<String> osLibs() {
		String OS = System.getProperty("os.name").toLowerCase();
		if (OS.indexOf("win") >= 0){
			return WINDOWS_DYNAMIC_LIBS;
		} else if (OS.indexOf("mac") >= 0) {
			return MAC_DYNAMIC_LIBS;
		} else if (OS.indexOf("nix") >= 0 || OS.indexOf("nux") >= 0 || OS.indexOf("aix") > 0 ) {
			return UNIX_DYNAMIC_LIBS;
		} else {
			throw new AsperaLibraryLoadException("OS is not supported for Aspera");
		}
	}
1152965
protected function getSystem()
    {
        $osName = strtolower(php_uname());

        if ($this->contains($osName, 'darwin')) {
            return 'macosx';
        } elseif ($this->contains($osName, 'win')) {
            return 'windows';
        } elseif ($this->contains($osName, 'linux')) {
            return PHP_INT_SIZE === 4 ? 'linux-i686' : 'linux-x86_64';
        } else {
            throw new RuntimeException('Unknown operating system.');
        }
    }
918954
public java.util.List<FileSystemDescription> getFileSystems() {
        if (fileSystems == null) {
            fileSystems = new com.amazonaws.internal.SdkInternalList<FileSystemDescription>();
        }
        return fileSystems;
    }
442997
public static Env of() {
		return of(
			System.getProperty("os.name"),
			System.getProperty("os.version"),
			System.getProperty("os.arch"),
			System.getProperty("java.version"),
			System.getProperty("java.runtime.name"),
			System.getProperty("java.runtime.version"),
			System.getProperty("java.vm.name"),
			System.getProperty("java.vm.version")
		);
	}
158299
private function getSystem()
    {
        $uname = strtolower(php_uname());
        if (str_contains($uname, 'darwin')) {
            return 'macosx';
        } elseif (str_contains($uname, 'win')) {
            return 'windows';
        } elseif (str_contains($uname, 'linux')) {
            return PHP_INT_SIZE === 4 ? 'linux-i686' : 'linux-x86_64';
        } else {
            throw new RuntimeException('Unknown operating system.');
        }
    }
48704
public static boolean JVMSupportsLargeMappedFiles() {
        String arch = System.getProperty("os.arch");
        if(arch==null || !arch.contains("64")) {
            return false;
        }

        if(isWindows())
            return false;

        //TODO better check for 32bit JVM
        return true;
    }
732731
@VisibleForTesting
	List<File> getProcessConfigFiles() {
		// TODO : should use a FileVisitor (Once we update to Java 7)
		File[] files;
		File configurationDirOrFile = configuration.getProcessConfigDirOrFile();
		if (configurationDirOrFile == null) {
			throw new IllegalStateException("Configuration should specify configuration directory or file, with -j of -f option");
		}
		if (configurationDirOrFile.isFile()) {
			files = new File[1];
			files[0] = configurationDirOrFile;
		} else {
			files = firstNonNull(configurationDirOrFile.listFiles(), new File[0]);
		}

		List<File> result = new ArrayList<>();
		for (File file : files) {
			if (this.isProcessConfigFile(file)) {
				result.add(file);
			}
		}
		return result;
	}
1135316
public static List<ClassLoader> getClassLoaders() {
        ClassLoader[] classLoaders = new ClassLoader[2];
        classLoaders[0] = FileUtils.class.getClassLoader();
        classLoaders[1] = Thread.currentThread().getContextClassLoader();

        // Clean up possible null values. Note that #getClassLoader may return a null value.
        List<ClassLoader> loaders = new ArrayList<ClassLoader>(classLoaders.length);
        for (ClassLoader classLoader : classLoaders) {
            if (classLoader != null) {
                loaders.add(classLoader);
            }
        }
        return loaders;
    }
433144
@SuppressWarnings("unchecked")
    protected List getCompileSourceRoots()
    {
        List roots = new ArrayList();
        roots.add(fixtureSourceDirectory.getAbsolutePath());
        return roots;
    }
326737
public static Set<URL> getBootstrappedLibraries() {
		final String name = PREFIX + SREBootstrap.class.getName();
		final Set<URL> result = new TreeSet<>();
		try {
			final Enumeration<URL> enumr = ClassLoader.getSystemResources(name);
			while (enumr.hasMoreElements()) {
				final URL url = enumr.nextElement();
				if (url != null) {
					result.add(url);
				}
			}
		} catch (Exception exception) {
			//
		}
        return result;
	}
374101
static List<String> getExecutableNames() {
        List<String> executableNames = new ArrayList<>();
        if (Platform.getCurrent().is(Platform.WINDOWS)) {
            Collections.addAll(executableNames, ProcessNames.PHANTOMJS.getWindowsImageName(),
                    ProcessNames.CHROMEDRIVER.getWindowsImageName(), ProcessNames.IEDRIVER.getWindowsImageName(),
                    ProcessNames.EDGEDRIVER.getWindowsImageName(), ProcessNames.GECKODRIVER.getWindowsImageName());
        } else {
            Collections.addAll(executableNames, ProcessNames.PHANTOMJS.getUnixImageName(),
                    ProcessNames.CHROMEDRIVER.getUnixImageName(), ProcessNames.GECKODRIVER.getUnixImageName());
        }
        return executableNames;
    }
177056
public static List<Resource> getClasspathResources() {
      synchronized (classpathResources) {
         if (classpathResources.isEmpty()) {
            for (String jar : SystemInfo.JAVA_CLASS_PATH.split(SystemInfo.PATH_SEPARATOR)) {
               File file = new File(jar);
               if (file.isDirectory()) {
                  classpathResources.addAll(new FileResource(file).getChildren(true));
               } else {
                  classpathResources.addAll(getJarContents(Resources.fromFile(jar), v -> true));
               }
            }
         }
         return Collections.unmodifiableList(classpathResources);
      }
   }
868218
private List getModulesFromServer() {

        List result = new ArrayList();

        // get the systems-exportpath
        String exportpath = OpenCms.getSystemInfo().getPackagesRfsPath();
        exportpath = OpenCms.getSystemInfo().getAbsoluteRfsPathRelativeToWebInf(exportpath + "modules");
        File folder = new File(exportpath);

        // get a list of all files
        String[] list = folder.list();
        for (int i = 0; i < list.length; i++) {
            try {
                File diskFile = new File(exportpath, list[i]);
                // check if it is a file and ends with zip -> this is a module
                if (diskFile.isFile() && diskFile.getName().endsWith(".zip")) {
                    result.add(new CmsSelectWidgetOption(diskFile.getName()));
                } else
                    if (diskFile.isDirectory() && ((new File(diskFile + File.separator + "manifest.xml")).exists())) {
                    // this is a folder with manifest file -> this a module
                    result.add(new CmsSelectWidgetOption(diskFile.getName()));
                }
            } catch (Throwable t) {
                // ignore and continue
            }
        }

        Collections.sort(result, new ComparatorSelectWidgetOption());
        return result;
    }
108574
@Pure
	public static boolean isCaseSensitiveFilenameSystem() {
		switch (OperatingSystem.getCurrentOS()) {
		case AIX:
		case ANDROID:
		case BSD:
		case FREEBSD:
		case NETBSD:
		case OPENBSD:
		case LINUX:
		case SOLARIS:
		case HPUX:
			return true;
			//$CASES-OMITTED$
		default:
			return false;
		}
	}
1022621
@Nullable
  public boolean loadLibraries() {
    synchronized (mLock) {
      if (mLoadLibraries == false) {
        return mLibrariesLoaded;
      }
      try {
        if (mLibraryNames != null) {
          for (String name : mLibraryNames) {
            SoLoader.loadLibrary(name);
          }
        }
        initialNativeCheck();
        mLibrariesLoaded = true;
        mLibraryNames = null;
      } catch (UnsatisfiedLinkError error) {
        Log.e(TAG, "Failed to load native lib (initial check): ", error);
        mLinkError = error;
        mLibrariesLoaded = false;
      } catch (Throwable other) {
        Log.e(TAG, "Failed to load native lib (other error): ", other);
        mLinkError = new UnsatisfiedLinkError("Failed loading libraries");
        mLinkError.initCause(other);
        mLibrariesLoaded = false;
      }
      mLoadLibraries = false;
      return mLibrariesLoaded;
    }
  }
566440
public static OperatingSystem getCurrent() {
    String name = System.getProperty("os.name");
    String version = System.getProperty("os.version");
    String lowerName = name.toLowerCase();
    if (lowerName.contains("linux")) return new OperatingSystem(name, version, Family.LINUX);
    if (lowerName.contains("mac os") || lowerName.contains("darwin")) return new OperatingSystem(name, version, Family.MAC_OS);
    if (lowerName.contains("windows")) return new OperatingSystem(name, version, Family.WINDOWS);
    if (lowerName.contains("sunos")) return new OperatingSystem(name, version, Family.SOLARIS);
    return new OperatingSystem(name, version, Family.OTHER);
  }
178260
public java.util.List<OperatingSystem> getOperatingSystems() {
        if (operatingSystems == null) {
            operatingSystems = new com.amazonaws.internal.SdkInternalList<OperatingSystem>();
        }
        return operatingSystems;
    }