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

项目: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;
}
项目:appdirs    文件:ShellFolderResolver.java   
protected int convertFolderId(FolderId folderId) {
  switch (folderId) {
  case APPDATA:
    return ShlObj.CSIDL_APPDATA;
  case LOCAL_APPDATA:
    return ShlObj.CSIDL_LOCAL_APPDATA;
  case COMMON_APPDATA:
    return ShlObj.CSIDL_COMMON_APPDATA;
  default:
    throw new AppDirsException(
        "Unknown folder ID " + folderId + " was specified.");
  }
}
项目:chipKIT-importer    文件:Win32ArduinoConfig.java   
@Override
public Path getSketchPath() {
    return Paths.get( Shell32Util.getFolderPath(ShlObj.CSIDL_MYDOCUMENTS) ).resolve("Arduino");
}
项目: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);
}