| java.lang.Object org.netbeans.modules.gsfret.source.parsing.FileObjects
FileObjects | public class FileObjects (Code) | | Creates various kinds of file objects
This file is originally from Retouche, the Java Support
infrastructure in NetBeans. I have modified the file as little
as possible to make merging Retouche fixes back as simple as
possible.
I've ripped out a bunch of stuff here
XXX - Rename to JavaFileObjects
author: Petr Hrebejk |
Inner Class :public static class InvalidFileException extends IOException | |
Method Summary | |
public static String | convertFolder2Package(String packageName) | public static String | convertFolder2Package(String packageName, char folderSeparator) | public static String | convertPackage2Folder(String packageName) | public static void | deleteRecursively(File folder) | public static ParserFile | fileFileObject(File file, File root, boolean platform, Object filter) | public static String | getBaseName(String fileName) Returns the basename name without folder path
Parameters: file - name, eg. | public static String | getBaseName(String fileName, char separator) Returns the basename name without folder path. | public static String | getBinaryName(File file, File root) | public static String[] | getFolderAndBaseName(String fileName, char separator) Returns the folder (package name separated by original separators)
and base name. | public static String | getName(FileObject fo, boolean noExt) | public static String[] | getParentRelativePathAndName(String className) | public static String | getRelativePath(String packageName, String relativeName) | public static String | getRelativePath(File root, File fo) | public static File | getRootFile(URL url) | public static String | getSimpleName(FileObject fo) | public static String | getSimpleName(String fileName) | public static String | stripExtension(String fileName) |
SIMPLE_NAME_FILEOBJECT_COMPARATOR | final public static Comparator<FileObject> SIMPLE_NAME_FILEOBJECT_COMPARATOR(Code) | | |
convertFolder2Package | public static String convertFolder2Package(String packageName, char folderSeparator)(Code) | | |
deleteRecursively | public static void deleteRecursively(File folder)(Code) | | |
getBaseName | public static String getBaseName(String fileName, char separator)(Code) | | Returns the basename name without folder path. You can specify
the path separator since eg zip files uses '/' regardless of platform.
Parameters: file - name, eg. obtained from FileObjects.getPath or {java.io.File.getPath} Parameters: separator - path separator the base name |
getFolderAndBaseName | public static String[] getFolderAndBaseName(String fileName, char separator)(Code) | | Returns the folder (package name separated by original separators)
and base name.
Parameters: path - array of 2 strings, 1st the folder 2nd the base name |
getParentRelativePathAndName | public static String[] getParentRelativePathAndName(String className)(Code) | | |
getSimpleName | public static String getSimpleName(FileObject fo)(Code) | | |
|
|