Java File Object Create toFile(File currentDirectory, String file)

Here you can find the source of toFile(File currentDirectory, String file)

Description

to File

License

Open Source License

Declaration

public static File toFile(File currentDirectory, String file) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.io.File;

public class Main {
    public static File toFile(File currentDirectory, String file) {
        String f = file == null ? "" : file;
        if (f.startsWith("/")) {
            return new File(f);
        }// w  ww.  jav  a  2s. c o  m
        return new File(currentDirectory, f);
    }
}

Related

  1. toFile(byte[] bFile)
  2. toFile(Class cls)
  3. toFile(File baseDir, String path)
  4. toFile(File dir, String[] path)
  5. toFile(File dstPath, String fullClassName)
  6. toFile(File file, byte[] data)
  7. toFile(IFile file)