mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
File name with backslashes (low-level)
This commit is contained in:
@@ -133,7 +133,7 @@ public class FileSystemUtil {
|
||||
@SuppressWarnings("UnusedDeclaration")
|
||||
@Nullable
|
||||
public static FileAttributes getAttributes(@NotNull final File file) {
|
||||
return getAttributes(file.getAbsolutePath());
|
||||
return getAttributes(file.getPath());
|
||||
}
|
||||
|
||||
public static boolean isSymLink(@NotNull final String path) {
|
||||
|
||||
@@ -108,6 +108,12 @@ public class FileAttributesReadingTest {
|
||||
assertFileAttributes(new File(file.getPath().replace(File.separator, File.separator + "." + File.separator)));
|
||||
assertFileAttributes(new File(myTempDirectory,
|
||||
File.separator + ".." + File.separator + myTempDirectory.getName() + File.separator + file.getName()));
|
||||
|
||||
if (SystemInfo.isUnix) {
|
||||
final File backSlashFile = FileUtil.createTempFile(myTempDirectory, "test\\", "\\txt", true);
|
||||
FileUtil.writeToFile(backSlashFile, myTestData);
|
||||
assertFileAttributes(backSlashFile);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user