Find file path in windows using Java - java

Is there a way to find a particular file path in windows. For example say I want to find the location of putty.exe in my local, is there any way I can get the full file path?
I tried the following code using apache commons-io utility , but it is taking a lot of time as there are a lot of files in the local.
File dir = new File("C:\\");
String[] extensions = new String[]{"exe"};
IOFileFilter filter = new SuffixFileFilter(extensions, IOCase.INSENSITIVE);
List<File> fileList = (List<File>) FileUtils.listFiles(dir, filter, DirectoryFileFilter.DIRECTORY);
System.out.println("file list size "+fileList.size());
for (File file : fileList) {
if (file.getName().toLowerCase().contains("putty")) {
System.out.println(file.getPath());
}
}
Is there another faster way?
Edit I want to find putty.exe in particular.

No program is ever expected to scan the entire disk looking for a file it needs.
Programs use one of the following techniques:
Look at the directories in the PATH environment variable, when looking for an executable
Require the user to provide the locations of the files at installation time and store them somewhere known. This could be a .ini file stored in the program's home directory; on Windows: the system registry or a User or System environment variable (which ends up in the registry as well).
The installer creates a launcher shell script that sets an application-specific environment variable which is read by the program.
There are probably several others I haven't thought of. The idea is to limit the places the program has to search.

When they installed the executable in a regular fashion, it is on the PATH variable.
public static Optional<Path> exePath(String exeName) {
String pathVar = System.getenv("PATH");
Pattern varPattern = Pattern.compile("%(\\w+)%");
boolean tryVars = true;
while (tryVars) {
tryVars = false;
Matcher m = varPattern.matcher(pathVar);
StringBuffer sb = new StringBuffer();
while (m.find()) {
tryVars = true;
m.appendReplacement(sb, System.getenv(m.group(1)));
}
m.appendTail(sb);
pathVar = sb.toString();
}
String[] dirs = pathVar.split("\\s*;\\s*");
for (String dir : dirs) {
Path path = Paths.get(dir, exeName);
if (Files.exists(path)) {
return Optional.of(path);
}
}
return Optional.empty();
}
System.out.println(exePath("java.exe"));
Probably the var pattern substitution is done automatically (%JAVA_HOME% and such)

Related

Filter subdirectories based on regex in java

I have a directory structure as below:
/test_directory/data/date=2021-01-01/
/test_directory/data/date=2021-01-02/
/test_directory/data/date=2021-01-03/
/test_directory/data/sample=2021-01-04/
/test_directory/data/sample=2021-01-05/
I want to filter only the date folders.
/test_directory/data/date=2021-01-01/
/test_directory/data/date=2021-01-02/
/test_directory/data/date=2021-01-03/
I tired the below code: But unable to keep the regex in the directory path.
String dir = "/test_directory/data/";
File[] directories = new File(dir).listFiles(File::isDirectory);
for(int i=0;i< directories.length;i++){
System.out.println(directories[i]);
}
First of all, let's migrate to the nio API, which is meant to replace the File API since Java 1.7.
String dir = "/test_directory/data/";
Files.list(Paths.get(dir))
.filter(Files::isDirectory)
.forEach(directory -> {
System.out.println(directory.toString());
};
At this point, since you have a Stream, you can easily add an additional filter. This can be regex-based or just a simple String.startsWith.
String dir = "/test_directory/data/";
Files.list(Paths.get(dir))
.filter(Files::isDirectory)
.filter(directory -> directory.getFileName().toString().startsWith("date"))
.forEach(directory -> {
System.out.println(directory.toString());
};
Using the File API, you cannot have multiple filters, so you have to combine yourself.
String dir = "/test_directory/data/";
File[] directories = new File(dir).listFiles(
directory -> directory.isDirectory()
&& directory.getName().startsWith("date"));
for (File directory : directories) {
System.out.println(directory.getPath());
}

How do you list all files in the Resources folder (java/scala)

I am writing a function which needs to access a folder in the resources, and loop through all filenames, and if those match the criteria, those files are loaded.
new File(getClass.getResource("/images/sprites").getPath).listFiles()
returns a null pointer exception, where the directory tree follows Resources -> images -> sprites ->
Please can somebody point me in the right direction?
Joop Eggen's answer is awesome, however it can only do one of two things:
Read the resources content when running from a IDE
Read the resources content when running the JAR via the command line
So here's a example (Kotlin, but it should be easy to migrate it to Java) that allows you to have both: Reading the resources content when running from a IDE or via the command line!
val uri = MainApp::class.java.getResource("/locales/").toURI()
val dirPath = try {
Paths.get(uri)
} catch (e: FileSystemNotFoundException) {
// If this is thrown, then it means that we are running the JAR directly (example: not from an IDE)
val env = mutableMapOf<String, String>()
FileSystems.newFileSystem(uri, env).getPath("/locales/")
}
Files.list(dirPath).forEach {
println(it.fileName)
if (it.fileName.toString().endsWith("txt")) {
println("Result:")
println(Files.readString(it))
}
}
A zip file system using jar:file: URIs would be something like this:
URI uri = MainApp.class.getResource("/images/sprites").toURI();
Map<String, String> env = new HashMap<>();
try (FileSystem zipfs = FileSystems.newFileSystem(uri, env)) {
//Path path = zipfs.getPath("/images/icons16");
for (Path path : zipfs.getRootDirectories()) {
Files.list(path.resolve("/images/sprites"))
.forEach(p -> System.out.println("* " + p));
}
}
Here I show getRootDirectories to possibly iterate over all resources.
Using the Files.copy one may copy them etcetera.
After comment of #MrPowerGamerBR:
The solution above deals with a jar. A more general solution, not exposing the jar character, is:
URI uri = MAinApp.class.getResource("/images/sprites").toURI();
Path dirPath = Paths.get(uri);
Files.list(dirPath)
.forEach(p -> System.out.println("* " + p));
(In fact one might even read lines from the directory itself, but this
is the correct abstraction, using Path.)

Get absolute path of java app on Heroku [duplicate]

I want to access my current working directory using Java.
My code:
String currentPath = new java.io.File(".").getCanonicalPath();
System.out.println("Current dir:" + currentPath);
String currentDir = System.getProperty("user.dir");
System.out.println("Current dir using System:" + currentDir);
Output:
Current dir: C:\WINDOWS\system32
Current dir using System: C:\WINDOWS\system32
My output is not correct because the C drive is not my current directory.
How to get the current directory?
Code :
public class JavaApplication {
public static void main(String[] args) {
System.out.println("Working Directory = " + System.getProperty("user.dir"));
}
}
This will print the absolute path of the current directory from where your application was initialized.
Explanation:
From the documentation:
java.io package resolve relative pathnames using current user directory. The current directory is represented as system property, that is, user.dir and is the directory from where the JVM was invoked.
See: Path Operations (The Java™ Tutorials > Essential Classes > Basic I/O).
Using java.nio.file.Path and java.nio.file.Paths, you can do the following to show what Java thinks is your current path. This for 7 and on, and uses NIO.
Path currentRelativePath = Paths.get("");
String s = currentRelativePath.toAbsolutePath().toString();
System.out.println("Current absolute path is: " + s);
This outputs:
Current absolute path is: /Users/george/NetBeansProjects/Tutorials
that in my case is where I ran the class from.
Constructing paths in a relative way, by not using a leading separator to indicate you are constructing an absolute path, will use this relative path as the starting point.
The following works on Java 7 and up (see here for documentation).
import java.nio.file.Paths;
Paths.get(".").toAbsolutePath().normalize().toString();
This will give you the path of your current working directory:
Path path = FileSystems.getDefault().getPath(".");
And this will give you the path to a file called "Foo.txt" in the working directory:
Path path = FileSystems.getDefault().getPath("Foo.txt");
Edit :
To obtain an absolute path of current directory:
Path path = FileSystems.getDefault().getPath(".").toAbsolutePath();
* Update *
To get current working directory:
Path path = FileSystems.getDefault().getPath("").toAbsolutePath();
Java 11 and newer
This solution is better than others and more portable:
Path cwd = Path.of("").toAbsolutePath();
Or even
String cwd = Path.of("").toAbsolutePath().toString();
This is the solution for me
File currentDir = new File("");
What makes you think that c:\windows\system32 is not your current directory? The user.dir property is explicitly to be "User's current working directory".
To put it another way, unless you start Java from the command line, c:\windows\system32 probably is your CWD. That is, if you are double-clicking to start your program, the CWD is unlikely to be the directory that you are double clicking from.
Edit: It appears that this is only true for old windows and/or Java versions.
Use CodeSource#getLocation().
This works fine in JAR files as well. You can obtain CodeSource by ProtectionDomain#getCodeSource() and the ProtectionDomain in turn can be obtained by Class#getProtectionDomain().
public class Test {
public static void main(String... args) throws Exception {
URL location = Test.class.getProtectionDomain().getCodeSource().getLocation();
System.out.println(location.getFile());
}
}
this.getClass().getClassLoader().getResource("").getPath()
generally, as a File object:
File getCwd() {
return new File("").getAbsoluteFile();
}
you may want to have full qualified string like "D:/a/b/c" doing:
getCwd().getAbsolutePath()
I'm on Linux and get same result for both of these approaches:
#Test
public void aaa()
{
System.err.println(Paths.get("").toAbsolutePath().toString());
System.err.println(System.getProperty("user.dir"));
}
Paths.get("") docs
System.getProperty("user.dir") docs
I hope you want to access the current directory including the package i.e. If your Java program is in c:\myApp\com\foo\src\service\MyTest.java and you want to print until c:\myApp\com\foo\src\service then you can try the following code:
String myCurrentDir = System.getProperty("user.dir")
+ File.separator
+ System.getProperty("sun.java.command")
.substring(0, System.getProperty("sun.java.command").lastIndexOf("."))
.replace(".", File.separator);
System.out.println(myCurrentDir);
Note: This code is only tested in Windows with Oracle JRE.
On Linux when you run a jar file from terminal, these both will return the same String: "/home/CurrentUser", no matter, where youre jar file is. It depends just on what current directory are you using with your terminal, when you start the jar file.
Paths.get("").toAbsolutePath().toString();
System.getProperty("user.dir");
If your Class with main would be called MainClass, then try:
MainClass.class.getProtectionDomain().getCodeSource().getLocation().getFile();
This will return a String with absolute path of the jar file.
Using Windows user.dir returns the directory as expected, but NOT when you start your application with elevated rights (run as admin), in that case you get C:\WINDOWS\system32
Mention that it is checked only in Windows but i think it works perfect on other Operating Systems [Linux,MacOs,Solaris] :).
I had 2 .jar files in the same directory . I wanted from the one .jar file to start the other .jar file which is in the same directory.
The problem is that when you start it from the cmd the current directory is system32.
Warnings!
The below seems to work pretty well in all the test i have done even
with folder name ;][[;'57f2g34g87-8+9-09!2##!$%^^&() or ()%&$%^##
it works well.
I am using the ProcessBuilder with the below as following:
🍂..
//The class from which i called this was the class `Main`
String path = getBasePathForClass(Main.class);
String applicationPath= new File(path + "application.jar").getAbsolutePath();
System.out.println("Directory Path is : "+applicationPath);
//Your know try catch here
//Mention that sometimes it doesn't work for example with folder `;][[;'57f2g34g87-8+9-09!2##!$%^^&()`
ProcessBuilder builder = new ProcessBuilder("java", "-jar", applicationPath);
builder.redirectErrorStream(true);
Process process = builder.start();
//...code
🍂getBasePathForClass(Class<?> classs):
/**
* Returns the absolute path of the current directory in which the given
* class
* file is.
*
* #param classs
* #return The absolute path of the current directory in which the class
* file is.
* #author GOXR3PLUS[StackOverFlow user] + bachden [StackOverFlow user]
*/
public static final String getBasePathForClass(Class<?> classs) {
// Local variables
File file;
String basePath = "";
boolean failed = false;
// Let's give a first try
try {
file = new File(classs.getProtectionDomain().getCodeSource().getLocation().toURI().getPath());
if (file.isFile() || file.getPath().endsWith(".jar") || file.getPath().endsWith(".zip")) {
basePath = file.getParent();
} else {
basePath = file.getPath();
}
} catch (URISyntaxException ex) {
failed = true;
Logger.getLogger(classs.getName()).log(Level.WARNING,
"Cannot firgue out base path for class with way (1): ", ex);
}
// The above failed?
if (failed) {
try {
file = new File(classs.getClassLoader().getResource("").toURI().getPath());
basePath = file.getAbsolutePath();
// the below is for testing purposes...
// starts with File.separator?
// String l = local.replaceFirst("[" + File.separator +
// "/\\\\]", "")
} catch (URISyntaxException ex) {
Logger.getLogger(classs.getName()).log(Level.WARNING,
"Cannot firgue out base path for class with way (2): ", ex);
}
}
// fix to run inside eclipse
if (basePath.endsWith(File.separator + "lib") || basePath.endsWith(File.separator + "bin")
|| basePath.endsWith("bin" + File.separator) || basePath.endsWith("lib" + File.separator)) {
basePath = basePath.substring(0, basePath.length() - 4);
}
// fix to run inside netbeans
if (basePath.endsWith(File.separator + "build" + File.separator + "classes")) {
basePath = basePath.substring(0, basePath.length() - 14);
}
// end fix
if (!basePath.endsWith(File.separator)) {
basePath = basePath + File.separator;
}
return basePath;
}
assume that you're trying to run your project inside eclipse, or netbean or stand alone from command line. I have write a method to fix it
public static final String getBasePathForClass(Class<?> clazz) {
File file;
try {
String basePath = null;
file = new File(clazz.getProtectionDomain().getCodeSource().getLocation().toURI().getPath());
if (file.isFile() || file.getPath().endsWith(".jar") || file.getPath().endsWith(".zip")) {
basePath = file.getParent();
} else {
basePath = file.getPath();
}
// fix to run inside eclipse
if (basePath.endsWith(File.separator + "lib") || basePath.endsWith(File.separator + "bin")
|| basePath.endsWith("bin" + File.separator) || basePath.endsWith("lib" + File.separator)) {
basePath = basePath.substring(0, basePath.length() - 4);
}
// fix to run inside netbean
if (basePath.endsWith(File.separator + "build" + File.separator + "classes")) {
basePath = basePath.substring(0, basePath.length() - 14);
}
// end fix
if (!basePath.endsWith(File.separator)) {
basePath = basePath + File.separator;
}
return basePath;
} catch (URISyntaxException e) {
throw new RuntimeException("Cannot firgue out base path for class: " + clazz.getName());
}
}
To use, everywhere you want to get base path to read file, you can pass your anchor class to above method, result may be the thing you need :D
Best,
For Java 11 you could also use:
var path = Path.of(".").toRealPath();
This is a very confuse topic, and we need to understand some concepts before providing a real solution.
The File, and NIO File Api approaches with relative paths "" or "." uses internally the system parameter "user.dir" value to determine the return location.
The "user.dir" value is based on the USER working directory, and the behavior of that value depends on the operative system, and the way the jar is executed.
For example, executing a JAR from Linux using a File Explorer (opening it by double click) will set user.dir with the user home directory, regardless of the location of the jar. If the same jar is executed from command line, it will return the jar location, because each cd command to the jar location modified the working directory.
Having said that, the solutions using Java NIO, Files or "user.dir" property will work for all the scenarios in the way the "user.dir" has the correct value.
String userDirectory = System.getProperty("user.dir");
String userDirectory2 = new File("").getAbsolutePath();
String userDirectory3 = Paths.get("").toAbsolutePath().toString();
We could use the following code:
new File(MyApp.class.getProtectionDomain()
.getCodeSource()
.getLocation()
.toURI().getPath())
.getParent();
to get the current location of the executed JAR, and personally I used the following approach to get the expected location and overriding the "user.dir" system property at the very beginning of the application. So, later when the other approaches are used, I will get the expected values always.
More details here -> https://blog.adamgamboa.dev/getting-current-directory-path-in-java/
public class MyApp {
static {
//This static block runs at the very begin of the APP, even before the main method.
try{
File file = new File(MyApp.class.getProtectionDomain().getCodeSource()
.getLocation().toURI().getPath());
String basePath = file.getParent();
//Overrides the existing value of "user.dir"
System.getProperties().put("user.dir", basePath);
}catch(URISyntaxException ex){
//log the error
}
}
public static void main(String args []){
//Your app logic
//All these approaches should return the expected value
//regardless of the way the jar is executed.
String userDirectory = System.getProperty("user.dir");
String userDirectory2 = new File("").getAbsolutePath();
String userDirectory3 = Paths.get("").toAbsolutePath().toString();
}
}
I hope this explanation and details are helpful to others...
Current working directory is defined differently in different Java implementations. For certain version prior to Java 7 there was no consistent way to get the working directory. You could work around this by launching Java file with -D and defining a variable to hold the info
Something like
java -D com.mycompany.workingDir="%0"
That's not quite right, but you get the idea. Then System.getProperty("com.mycompany.workingDir")...
This is my silver bullet when ever the moment of confusion bubbles in.(Call it as first thing in main). Maybe for example JVM is slipped to be different version by IDE. This static function searches current process PID and opens VisualVM on that pid. Confusion stops right there because you want it all and you get it...
public static void callJVisualVM() {
System.out.println("USER:DIR!:" + System.getProperty("user.dir"));
//next search current jdk/jre
String jre_root = null;
String start = "vir";
try {
java.lang.management.RuntimeMXBean runtime =
java.lang.management.ManagementFactory.getRuntimeMXBean();
String jvmName = runtime.getName();
System.out.println("JVM Name = " + jvmName);
long pid = Long.valueOf(jvmName.split("#")[0]);
System.out.println("JVM PID = " + pid);
Runtime thisRun = Runtime.getRuntime();
jre_root = System.getProperty("java.home");
System.out.println("jre_root:" + jre_root);
start = jre_root.concat("\\..\\bin\\jvisualvm.exe " + "--openpid " + pid);
thisRun.exec(start);
} catch (Exception e) {
System.getProperties().list(System.out);
e.printStackTrace();
}
}
This isn't exactly what's asked, but here's an important note: When running Java on a Windows machine, the Oracle installer puts a "java.exe" into C:\Windows\system32, and this is what acts as the launcher for the Java application (UNLESS there's a java.exe earlier in the PATH, and the Java app is run from the command-line). This is why File(".") keeps returning C:\Windows\system32, and why running examples from macOS or *nix implementations keep coming back with different results from Windows.
Unfortunately, there's really no universally correct answer to this one, as far as I have found in twenty years of Java coding unless you want to create your own native launcher executable using JNI Invocation, and get the current working directory from the native launcher code when it's launched. Everything else is going to have at least some nuance that could break under certain situations.
Try something like this I know I am late for the answer but this obvious thing happened in java8 a new version from where this question is asked but..
The code
import java.io.File;
public class Find_this_dir {
public static void main(String[] args) {
//some sort of a bug in java path is correct but file dose not exist
File this_dir = new File("");
//but these both commands work too to get current dir
// File this_dir_2 = new File(this_dir.getAbsolutePath());
File this_dir_2 = new File(new File("").getAbsolutePath());
System.out.println("new File(" + "\"\"" + ")");
System.out.println(this_dir.getAbsolutePath());
System.out.println(this_dir.exists());
System.out.println("");
System.out.println("new File(" + "new File(" + "\"\"" + ").getAbsolutePath()" + ")");
System.out.println(this_dir_2.getAbsolutePath());
System.out.println(this_dir_2.exists());
}
}
This will work and show you the current path but I don't now why java fails to find current dir in new File(""); besides I am using Java8 compiler...
This works just fine I even tested it new File(new File("").getAbsolutePath());
Now you have current directory in a File object so (Example file object is f then),
f.getAbsolutePath() will give you the path in a String varaible type...
Tested in another directory that is not drive C works fine
My favorite method is to get it from the system environment variables attached to the current running process. In this case, your application is being managed by the JVM.
String currentDir = System.getenv("PWD");
/*
/home/$User/Documents/java
*/
To view other environment variables that you might find useful like, home dir, os version ........
//Home directory
String HomeDir = System.getEnv("HOME");
//Outputs for unix
/home/$USER
//Device user
String user = System.getEnv("USERNAME");
//Outputs for unix
$USER
The beautiful thing with this approach is that all paths will be resolved for all types of OS platform
You might use new File("./"). This way isDirectory() returns true (at least on Windows platform). On the other hand new File("") isDirectory() returns false.
None of the answers posted here worked for me. Here is what did work:
java.nio.file.Paths.get(
getClass().getProtectionDomain().getCodeSource().getLocation().toURI()
);
Edit: The final version in my code:
URL myURL = getClass().getProtectionDomain().getCodeSource().getLocation();
java.net.URI myURI = null;
try {
myURI = myURL.toURI();
} catch (URISyntaxException e1)
{}
return java.nio.file.Paths.get(myURI).toFile().toString()
System.getProperty("java.class.path")

Locate a file regardless of Casing?

I'm working on a program. However, the program is that I'm on a Linux based operating system and it wants perfect case-match names for all of the files, and considering the artist has some named with Caps, some not, some have ".png" some are ".Png" and some are ".PNG", etc; this is becoming a very difficult task. There's a little over a thousand Sprites, or renaming them wouldn’t be a problem. This is for a 2D RPG Hobby project that I'm doing for learning, purposes that I've been working on for awhile now.
Anyhow, my question is if we can make the 'Compiler'(I think is the right way to word this) ignore the file ending character-casing? If I want to load the following items
1.jpg
2.Jpg
3.JPg
4.JPG
5.jpG
I would like to be able to do it in a single line.
You cannot make the compiler ignore case; this is a filesystem characteristic. Note that NTFS is case-insensitive but it is case-preserving nonetheless.
Using Java 7 you can use a DirectoryStream.Filter<Path> to collect the relevant paths; then rename if appropriate:
final DirectoryStream.Filter<Path> filter = new DirectoryStream.Filter<Path>()
{
#Override
public boolean accept(final Path entry)
{
return Files.isRegularFile(entry)
&& entry.getFileName().toString().toLowerCase().endsWith(".jpg");
}
};
final List<Path> collected = new ArrayList<Path>();
try (
final DirectoryStream<Path> entries = Files.newDirectoryStream(dir, filter);
) {
for (final Path entry: entries)
collected.add(entry);
}
Path dst;
String targetName;
for (final Path src: collected) {
targetName = src.getFileName().toString().toLowerCase();
dst = src.resolveSibling(targetName);
if (!Files.isSameFile(src, dst))
Files.move(src, dst, StandardCopyOption.ATOMIC_MOVE);
}
With Java 8 you would probably use Files.walk() and lambdas instead.
If you know the exact directory for the file, you could use File.list() to get an String[] of all files in this directory. By iterating over those and using toLowerCase() on the filenames you can find your desired file.
String filename = "1.jpg";
String targetFilename = null;
File directory = new File("/some/path");
for(String maybeTargetName : directory.list()) {
if(filename.equals(maybeTargetName.toLowerCase()) {
targetFilename = maybeTargetName;
break;
}
}
if(targetFilename != null) {
File targetFile = new File(directory, targetFilename);
}

Getting Special folders to work in Apache Commons VFS

The Apache Commons VFS library appears to be unable to support special Windows folders (Network, recent, computer, libraries, etc).
File[] cbFolders = (File[])sun.awt.shell.ShellFolder.get("fileChooserComboBoxFolders");
and then converting them to FileObjects like so:
for(File f: cbFolders){
fileObjArray.add(mgr.resolveFile(f.getPath()));
}
It just doesn't work and all you get is the path name for its name.
The path of these files are like ::{20D04FE0-3AEA-1069-A2D8-08002B30309D}
Any help in getting this working would be appreciated. It looks like its most likely a bug in the library. Hopefully someone knows of a hack or such to get it working.
Edit:
I believe I was close when I created new shortcuts
try{
final File[] cbFolders = (File[])sun.awt.shell.ShellFolder.get("fileChooserComboBoxFolders");
String name = "";
File[] systemFiles = new File[cbFolders.length];
i =0;
for(File f: cbFolders){
name = f.getName();
if(name.startsWith("::{")){
name = name.substring(2);
System.out.println("converting: " + name);
String fileName = fileSystemView.getSystemDisplayName(f);
File file = new File("C:\\Users\\Daniel\\Desktop\\" + fileName + "." + name);
boolean success = false;
success = file.mkdir(); //returns false even if it works,
systemFiles[i] = file;
}else
systemFiles[i] = f;
i++;
}
list = new ArrayList<File>(Arrays.asList(systemFiles));
}catch(final Exception e){
...
}
It shows the correct icon and name and on Windows Explorer it opens correctly, but still with VFS it opens an empty folder.
There is no real support for those files. The main problem is that neither the Java File object treats them correctly (new File("::{20D04FE0-3AEA-1069-A2D8-08002B30309D}").toURI().toString() does not properly escape the colons) nor is Java or VFS knowing about :: as an absolute filesystem root. So you cannot transform them into a URI (required by resolveFile()) which keeps the special properties recognized by Windows.

Categories

Resources