本文整理汇总了Java中com.intellij.openapi.util.io.win32.IdeaWin32类的典型用法代码示例。如果您正苦于以下问题:Java IdeaWin32类的具体用法?Java IdeaWin32怎么用?Java IdeaWin32使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IdeaWin32类属于com.intellij.openapi.util.io.win32包,在下文中一共展示了IdeaWin32类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadPlatformLibrary
import com.intellij.openapi.util.io.win32.IdeaWin32; //导入依赖的package包/类
public static void loadPlatformLibrary(@NotNull String libName) {
String libFileName = mapLibraryName(libName);
String libPath = PathManager.getBinPath() + "/" + libFileName;
if (!new File(libPath).exists()) {
String platform = getPlatformName();
if (!new File(libPath = PathManager.getHomePath() + "/community/bin/" + platform + libFileName).exists()) {
if (!new File(libPath = PathManager.getHomePath() + "/bin/" + platform + libFileName).exists()) {
if (!new File(libPath = PathManager.getHomePathFor(IdeaWin32.class) + "/bin/" + libFileName).exists()) {
File libDir = new File(PathManager.getBinPath());
throw new UnsatisfiedLinkError("'" + libFileName + "' not found in '" + libDir + "' among " + Arrays.toString(libDir.list()));
}
}
}
}
System.load(libPath);
}
示例2: getAttributes
import com.intellij.openapi.util.io.win32.IdeaWin32; //导入依赖的package包/类
@NotNull
private static FileAttributes getAttributes(@NotNull final File file, final boolean checkList) {
final FileAttributes attributes = FileSystemUtil.getAttributes(file);
assertNotNull(attributes);
if (SystemInfo.isWindows && checkList) {
final String parent = file.getParent();
if (parent != null) {
final FileInfo[] infos = IdeaWin32.getInstance().listChildren(parent);
assertNotNull(infos);
for (FileInfo info : infos) {
if (file.getName().equals(info.getName())) {
assertEquals(attributes, info.toFileAttributes());
return attributes;
}
}
fail(file + " not listed");
}
}
return attributes;
}
示例3: getAttributes
import com.intellij.openapi.util.io.win32.IdeaWin32; //导入依赖的package包/类
@Nonnull
private static FileAttributes getAttributes(@Nonnull final File file, final boolean checkList) {
final FileAttributes attributes = FileSystemUtil.getAttributes(file);
assertNotNull(attributes);
System.out.println(attributes + ": " + file);
if (SystemInfo.isWindows && checkList) {
final String parent = file.getParent();
if (parent != null) {
final FileInfo[] infos = IdeaWin32.getInstance().listChildren(parent);
assertNotNull(infos);
for (FileInfo info : infos) {
if (file.getName().equals(info.getName())) {
assertEquals(attributes, info.toFileAttributes());
return attributes;
}
}
fail(file + " not listed");
}
}
return attributes;
}
示例4: assertDirectoriesEqual
import com.intellij.openapi.util.io.win32.IdeaWin32; //导入依赖的package包/类
private static void assertDirectoriesEqual(@NotNull final File dir) {
final String[] list1 = dir.list();
assertNotNull(list1);
final FileInfo[] list2 = IdeaWin32.getInstance().listChildren(dir.getPath());
assertNotNull(list2);
if (list1.length + 2 != list2.length) {
assertEquals(Arrays.toString(list1), Arrays.toString(list2));
}
}
示例5: assertDirectoriesEqual
import com.intellij.openapi.util.io.win32.IdeaWin32; //导入依赖的package包/类
private static void assertDirectoriesEqual(@Nonnull final File dir) {
final String[] list1 = dir.list();
assertNotNull(list1);
final FileInfo[] list2 = IdeaWin32.getInstance().listChildren(dir.getPath());
assertNotNull(list2);
if (list1.length + 2 != list2.length) {
assertEquals(Arrays.toString(list1), Arrays.toString(list2));
}
}
示例6: isAvailable
import com.intellij.openapi.util.io.win32.IdeaWin32; //导入依赖的package包/类
public static boolean isAvailable() {
return IdeaWin32.isAvailable();
}
示例7: setUp
import com.intellij.openapi.util.io.win32.IdeaWin32; //导入依赖的package包/类
@Before
public void setUp() {
assumeTrue(SystemInfo.isWindows);
myDriver = IdeaWin32.getInstance();
myIdeaTotal = myJavaTotal = 0;
}
示例8: setUp
import com.intellij.openapi.util.io.win32.IdeaWin32; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
assumeTrue(SystemInfo.isWindows);
myDriver = IdeaWin32.getInstance();
myIdeaTotal = myJavaTotal = 0;
}