All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.cryptomator.frontend.fuse.MacUtil Maven / Gradle / Ivy

There is a newer version: 5.0.2
Show newest version
package org.cryptomator.frontend.fuse;

import java.nio.file.Path;

public class MacUtil {

	public static final String APPLEDOUBLE_PREFIX = "._";
	public static final String DSSTORE_FILENAME = ".DS_Store";


	/**
	 * Checks if the resource name of the given path is a MacOS specific AppleDouble or DS_Store filename
	 *
	 * @param p the path of the resource to be checked
	 * @return true if the resource name fits into the AppleDpuble or DS_Store naming scheme
	 */
	public static boolean isAppleDoubleOrDStoreName(Path p) {
		String filename = p.getFileName().toString();
		return filename.startsWith(APPLEDOUBLE_PREFIX) || filename.equals(DSSTORE_FILENAME);
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy