mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
symbolic links support
This commit is contained in:
Binary file not shown.
@@ -72,6 +72,15 @@ JNIEXPORT jobject JNICALL Java_com_intellij_openapi_vfs_impl_win32_IdeaWin32_get
|
||||
return CreateFileInfo(env, &data, infoClass);
|
||||
}
|
||||
|
||||
JNIEXPORT jboolean JNICALL Java_com_intellij_openapi_vfs_impl_win32_IdeaWin32_checkExist(JNIEnv *env, jobject method, jstring path) {
|
||||
jint result = 0;
|
||||
WIN32_FILE_ATTRIBUTE_DATA wfad;
|
||||
const jchar* str = env->GetStringChars(path, 0);
|
||||
|
||||
if (GetFileAttributesEx((LPCWSTR)path, GetFileExInfoStandard, &wfad)) return JNI_TRUE;
|
||||
return JNI_FALSE;
|
||||
}
|
||||
|
||||
JNIEXPORT jobjectArray JNICALL Java_com_intellij_openapi_vfs_impl_win32_IdeaWin32_listChildren(JNIEnv *env, jobject method, jstring path)
|
||||
{
|
||||
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?xml version="1.0" encoding="windows-1251"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8,00"
|
||||
Version="9.00"
|
||||
Name="IdeaWin32"
|
||||
ProjectGUID="{D1A0CC4B-C100-46E4-918A-958626AE1ACF}"
|
||||
RootNamespace="IdeaWin32"
|
||||
Keyword="Win32Proj"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
@@ -64,6 +65,8 @@
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
@@ -84,9 +87,6 @@
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
@@ -139,6 +139,8 @@
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
@@ -159,9 +161,6 @@
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
|
||||
@@ -22,5 +22,7 @@ public class IdeaWin32 {
|
||||
|
||||
public native FileInfo getInfo(String path);
|
||||
|
||||
public native boolean checkExist(String path);
|
||||
|
||||
public native FileInfo[] listChildren(String path);
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ public class Win32Kernel {
|
||||
return true;
|
||||
}
|
||||
catch (FileNotFoundException e) {
|
||||
return false;
|
||||
return myKernel.checkExist(path);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -56,13 +56,14 @@ public class Win32LocalFileSystem extends LocalFileSystemBase {
|
||||
};
|
||||
|
||||
public static Win32LocalFileSystem getWin32Instance() {
|
||||
if (!isAvailable()) throw new RuntimeException("dll is not loaded");
|
||||
Win32LocalFileSystem fileSystem = THREAD_LOCAL.get();
|
||||
fileSystem.myKernel.clearCache();
|
||||
return fileSystem;
|
||||
}
|
||||
|
||||
private final Win32Kernel myKernel = new Win32Kernel();
|
||||
private boolean checkMe = false;
|
||||
public static boolean checkMe = false;
|
||||
|
||||
private Win32LocalFileSystem() {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user