private File toJavaFile(ResourcePath directoryPath) { return new File(directoryPath.getFileSystemPathString()); } }
private File toJavaFile(ResourcePath directoryPath) { return new File(directoryPath.getFileSystemPathString()); } }
private File toJavaFile(ResourcePath directoryPath) { return new File(directoryPath.getFileSystemPathString()); } }
private File toJavaFile(ResourcePath directoryPath) { return new File(directoryPath.getFileSystemPathString()); } }
private File toJavaFile(ResourcePath directoryPath) { return new File(directoryPath.getFileSystemPathString()); } }
private File toJavaFile(ResourcePath directoryPath) { return new File(directoryPath.getFileSystemPathString()); } }
@Override public String getFilePath() { return _file.getPath().getFileSystemPathString(); }
@Override public String getFilePath() { return _file.getPath().getFileSystemPathString(); }
@Override public String toString() { return getPath().getFileSystemPathString(); }
@Override public String toString() { return getPath().getFileSystemPathString(); }
@Override public String getFilePath() { return _file.getPath().getFileSystemPathString(); }
public static String getTypeNameFromFile( IDirectory root, IFile file ) { String strClassPath = root.getPath().getFileSystemPathString() + File.separatorChar; String strQualifiedClassName = file.getPath().getFileSystemPathString().substring( strClassPath.length() ); int iDot = strQualifiedClassName.lastIndexOf( '.' ); if( iDot >= 0 ) { strQualifiedClassName = strQualifiedClassName.substring( 0, iDot ); strQualifiedClassName = strQualifiedClassName.replace( '/', '.' ).replace( '\\', '.' ); } if( strQualifiedClassName.startsWith( "." ) ) { strQualifiedClassName = strQualifiedClassName.substring( 1 ); } return strQualifiedClassName; }
@Override public List<? extends IFileMetadata> listFiles(ResourcePath directoryPath) { List<Win32FindData> findDatas = NativeWin32API.listDir(directoryPath.getFileSystemPathString()); List<IFileMetadata> fileMD = new ArrayList<IFileMetadata>(); for (Win32FindData findData : findDatas) { fileMD.add(new Win32FileMetadata(findData)); } return fileMD; }
@Override public List<? extends IFileMetadata> listFiles(ResourcePath directoryPath) { List<Win32FindData> findDatas = NativeWin32API.listDir(directoryPath.getFileSystemPathString()); List<IFileMetadata> fileMD = new ArrayList<IFileMetadata>(); for (Win32FindData findData : findDatas) { fileMD.add(new Win32FileMetadata(findData)); } return fileMD; }
private void maybeCopySourceFile( File parent, IGosuClass gsClass ) { ISourceFileHandle sfh = gsClass.getSourceFileHandle(); IFile srcFile = sfh.getFile(); if( srcFile != null ) { File file = new File( srcFile.getPath().getFileSystemPathString() ); if( file.isFile() ) { try { copyFile( file, new File( parent, file.getName() ) ); } catch( IOException e ) { throw new RuntimeException( e ); } } } }
private void maybeCopySourceFile( File parent, IGosuClass gsClass ) { ISourceFileHandle sfh = gsClass.getSourceFileHandle(); IFile srcFile = sfh.getFile(); if( srcFile != null ) { File file = new File( srcFile.getPath().getFileSystemPathString() ); if( file.isFile() ) { try { copyFile( file, new File( parent, file.getName() ) ); } catch( IOException e ) { throw new RuntimeException( e ); } } } }
@Override public int getClassPathLength() { return getEntry().getPath().getPath().getFileSystemPathString().length(); }
@Override public int getClassPathLength() { return getEntry().getPath().getPath().getFileSystemPathString().length(); }
@Override public IFileMetadata getFileMetadata(ResourcePath filePath) { Win32FindData findData = NativeWin32API.fileMetadata(filePath.getFileSystemPathString()); if (findData != null) { return new Win32FileMetadata(findData); } else { return new GenericFileMetadata(toJavaFile(filePath)); } }
@Override public IFileMetadata getFileMetadata(ResourcePath filePath) { Win32FindData findData = NativeWin32API.fileMetadata(filePath.getFileSystemPathString()); if (findData != null) { return new Win32FileMetadata(findData); } else { return new GenericFileMetadata(toJavaFile(filePath)); } }