Java 类com.sun.jna.platform.win32.Shell32Util 实例源码

项目:chipKIT-importer    文件:Win32ArduinoConfig.java   
@Override
public Path getSettingsPath() {        
    Path path = Paths.get( Shell32Util.getFolderPath(ShlObj.CSIDL_MYDOCUMENTS) ).resolve("ArduinoData");
    if (Files.exists(path)) {
        return path;
    }

    path = Paths.get( Shell32Util.getFolderPath(ShlObj.CSIDL_LOCAL_APPDATA) ).resolve("Arduino15");
    if ( Files.exists(path) ) {
        return path;
    }

    path = Paths.get(Shell32Util.getFolderPath(ShlObj.CSIDL_APPDATA) ).resolve("Arduino15");
    if ( Files.exists(path) ) {
        return path;
    }

    return null;
}
项目:chipKIT-importer    文件:Win32ArduinoConfig.java   
@Override
public Path getSketchPath() {
    return Paths.get( Shell32Util.getFolderPath(ShlObj.CSIDL_MYDOCUMENTS) ).resolve("Arduino");
}
项目:Mavkit    文件:WindowsDirectories.java   
private File getHome() {
    return new File(Shell32Util.getKnownFolderPath(KnownFolders.FOLDERID_RoamingAppData), appName);
}
项目:consulo    文件:DefaultPaths.java   
@Nonnull
@Override
public File getExternalPlatformDirectory(@Nonnull File defaultPath) {
  return new File(Shell32Util.getFolderPath(ShlObj.CSIDL_APPDATA), "Consulo Platform");
}
项目:consulo    文件:DefaultPaths.java   
@Nonnull
@Override
protected String getDocumentsDirNoPrefix() {
  return Shell32Util.getFolderPath(ShlObj.CSIDL_PERSONAL);
}
项目:consulo    文件:DefaultPaths.java   
@Nonnull
@Override
protected String getLocalSettingsDirNoPrefix() {
  // will return path like C:\Users\{user.name}\AppData\Local
  return Shell32Util.getFolderPath(ShlObj.CSIDL_LOCAL_APPDATA);
}
项目:consulo    文件:DefaultPaths.java   
@Nonnull
@Override
protected String getRoamingSettingsDirNoPrefix() {
  // will return path like C:\Users\{user.name}\AppData\Roaming
  return Shell32Util.getFolderPath(ShlObj.CSIDL_APPDATA);
}
项目:proxy-vole    文件:WinFirefoxProfileSource.java   
/*************************************************************************
 * Reads the current location of the app data folder from the registry.
 * 
 * @return a path to the folder.
 ************************************************************************/

private String getAppFolder() {
    return Shell32Util.getFolderPath(ShlObj.CSIDL_APPDATA);
}