当前位置: 首页>>代码示例>>Java>>正文


Java AbstractFileName类代码示例

本文整理汇总了Java中org.apache.commons.vfs2.provider.AbstractFileName的典型用法代码示例。如果您正苦于以下问题:Java AbstractFileName类的具体用法?Java AbstractFileName怎么用?Java AbstractFileName使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


AbstractFileName类属于org.apache.commons.vfs2.provider包,在下文中一共展示了AbstractFileName类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ZipFileSystem

import org.apache.commons.vfs2.provider.AbstractFileName; //导入依赖的package包/类
public ZipFileSystem(final AbstractFileName rootName,
                     final FileObject parentLayer,
                     final FileSystemOptions fileSystemOptions)
    throws FileSystemException
{
    super(rootName, parentLayer, fileSystemOptions);

    // Make a local copy of the file
    file = parentLayer.getFileSystem().replicateFile(parentLayer, Selectors.SELECT_SELF);

    // Open the Zip file
    if (!file.exists())
    {
        // Don't need to do anything
        zipFile = null;
        return;
    }

    // zipFile = createZipFile(this.file);
}
 
开发者ID:wso2,项目名称:wso2-commons-vfs,代码行数:21,代码来源:ZipFileSystem.java

示例2: JarFileObject

import org.apache.commons.vfs2.provider.AbstractFileName; //导入依赖的package包/类
protected JarFileObject(final AbstractFileName name,
                        final ZipEntry entry,
                        final JarFileSystem fs,
                        final boolean zipExists) throws FileSystemException
{
    super(name, entry, fs, zipExists);
    this.fs = fs;

    try
    {
        getAttributes(); // early get the attributes as the zip file might be closed
    }
    catch (IOException e)
    {
        throw new FileSystemException(e);
    }
}
 
开发者ID:wso2,项目名称:wso2-commons-vfs,代码行数:18,代码来源:JarFileObject.java

示例3: FtpFileObject

import org.apache.commons.vfs2.provider.AbstractFileName; //导入依赖的package包/类
protected FtpFileObject(final AbstractFileName name,
                        final FtpFileSystem fileSystem,
                        final FileName rootName)
    throws FileSystemException
{
    super(name, fileSystem);
    ftpFs = fileSystem;
    String relPath = UriParser.decode(rootName.getRelativeName(name));
    if (".".equals(relPath))
    {
        // do not use the "." as path against the ftp-server
        // e.g. the uu.net ftp-server do a recursive listing then
        // this.relPath = UriParser.decode(rootName.getPath());
        // this.relPath = ".";
        this.relPath = null;
    }
    else
    {
        this.relPath = relPath;
    }
}
 
开发者ID:wso2,项目名称:wso2-commons-vfs,代码行数:22,代码来源:FtpFileObject.java

示例4: TarFileSystem

import org.apache.commons.vfs2.provider.AbstractFileName; //导入依赖的package包/类
protected TarFileSystem(final AbstractFileName rootName,
                        final FileObject parentLayer,
                        final FileSystemOptions fileSystemOptions)
    throws FileSystemException
{
    super(rootName, parentLayer, fileSystemOptions);

    // Make a local copy of the file
    file = parentLayer.getFileSystem().replicateFile(parentLayer, Selectors.SELECT_SELF);

    // Open the Tar file
    if (!file.exists())
    {
        // Don't need to do anything
        tarFile = null;
        return;
    }

    // tarFile = createTarFile(this.file);
}
 
开发者ID:wso2,项目名称:wso2-commons-vfs,代码行数:21,代码来源:TarFileSystem.java

示例5: createFile

import org.apache.commons.vfs2.provider.AbstractFileName; //导入依赖的package包/类
/**
 * Creates a file object.  This method is called only if the requested
 * file is not cached.
 */
@Override
protected FileObject createFile(final AbstractFileName name) throws Exception
{
    // Find the file that the name points to
    final FileName junctionPoint = getJunctionForFile(name);
    final FileObject file;
    if (junctionPoint != null)
    {
        // Resolve the real file
        final FileObject junctionFile = junctions.get(junctionPoint);
        final String relName = junctionPoint.getRelativeName(name);
        file = junctionFile.resolveFile(relName, NameScope.DESCENDENT_OR_SELF);
    }
    else
    {
        file = null;
    }

    // Return a wrapper around the file
    return new DelegateFileObject(name, this, file);
}
 
开发者ID:wso2,项目名称:wso2-commons-vfs,代码行数:26,代码来源:VirtualFileSystem.java

示例6: createFile

import org.apache.commons.vfs2.provider.AbstractFileName; //导入依赖的package包/类
/**
 * Creates a file object.
 */
protected FileObject createFile(final AbstractFileName name) throws FileSystemException {
  if(!exists) {
    return new NonExistentJarFileObject(name, this);
  } else {
    String entryName = getRootName().getRelativeName(name);
    if(entryName.equals(".")) {
      return new FastJarRootFileObject(name, this);
    }

    JarEntry entry = getJarFile().getJarEntry(entryName + "/");
    if(entry != null) {
      return new FastJarFileObject(name, entry, this);
    }
    entry = getJarFile().getJarEntry(entryName);
    if(entry == null) {
      return new NonExistentJarFileObject(name, this);
    } else {
      return new FastJarFileObject(name, entry, this);
    }
  }
}
 
开发者ID:bedatadriven,项目名称:renjin-statet,代码行数:25,代码来源:FastJarFileSystem.java

示例7: GsiFtpFileObject

import org.apache.commons.vfs2.provider.AbstractFileName; //导入依赖的package包/类
/**
 * Instantiates a new gsi ftp file object.
 * 
 * @param name the name
 * @param fileSystem the file system
 * @param rootName the root name
 * 
 * @throws FileSystemException the file system exception
 */
protected GsiFtpFileObject(final AbstractFileName name, final GsiFtpFileSystem fileSystem, final FileName rootName) throws FileSystemException {
    super(name, fileSystem);
    ftpFs = fileSystem;
    String relPathTmp = UriParser.decode(rootName.getRelativeName(name));

    // log.debug("FileName=" + name + " Root=" + rootName
    // + " Relative path=" + relPath );

    if (".".equals(relPathTmp)) {
        // do not use the "." as path against the ftp-server
        // e.g. the uu.net ftp-server do a recursive listing then
        // this.relPath = UriParser.decode(rootName.getPath());
        // this.relPath = ".";
        // boolean ok = true;
        // try {
        // cwd = ftpFs.getClient().getCurrentDir();
        // }
        // catch (ServerException se) { ok = false;}
        // catch (IOException se) { ok = false;}

        // if ( ! ok ) {
        // throw new FileSystemException("vfs.provider.gsiftp/get-type.error", getName());
        // }
        this.relPath = "/"; // cwd;
    } else {
        this.relPath = relPathTmp;
    }
}
 
开发者ID:clstoulouse,项目名称:motu,代码行数:38,代码来源:GsiFtpFileObject.java

示例8: AzFileObject

import org.apache.commons.vfs2.provider.AbstractFileName; //导入依赖的package包/类
/**
 * Creates a new FileObject for use with a remote Azure Blob Storage file or folder.
 * 
 * @param name
 * @param fileSystem 
 */
protected AzFileObject(final AbstractFileName name, final AzFileSystem fileSystem)
{
    super(name, fileSystem);
    this.fileSystem = fileSystem;
    
    currContainer = null;
    currBlob = null;
    currBlobProperties = null;
    currContainerProperties = null;
}
 
开发者ID:kervinpierre,项目名称:vfs-azure,代码行数:17,代码来源:AzFileObject.java

示例9: MimeFileObject

import org.apache.commons.vfs2.provider.AbstractFileName; //导入依赖的package包/类
protected MimeFileObject(final AbstractFileName name,
                        final Part part,
                        final AbstractFileSystem fileSystem) throws FileSystemException
{
    super(name, fileSystem);
    setPart(part);
}
 
开发者ID:wso2,项目名称:wso2-commons-vfs,代码行数:8,代码来源:MimeFileObject.java

示例10: createFile

import org.apache.commons.vfs2.provider.AbstractFileName; //导入依赖的package包/类
/**
 * Creates a file object.
 */
@Override
protected FileObject createFile(final AbstractFileName name) throws FileSystemException
{
    // This is only called for files which do not exist in the Zip file
    return new ZipFileObject(name, null, this, false);
}
 
开发者ID:wso2,项目名称:wso2-commons-vfs,代码行数:10,代码来源:ZipFileSystem.java

示例11: ZipFileObject

import org.apache.commons.vfs2.provider.AbstractFileName; //导入依赖的package包/类
protected ZipFileObject(AbstractFileName name,
                        ZipEntry entry,
                        ZipFileSystem fs,
                        boolean zipExists) throws FileSystemException
{
    super(name, fs);
    this.fs = fs;
    setZipEntry(entry);
    if (!zipExists)
    {
        type = FileType.IMAGINARY;
    }
}
 
开发者ID:wso2,项目名称:wso2-commons-vfs,代码行数:14,代码来源:ZipFileObject.java

示例12: doCreateFileSystem

import org.apache.commons.vfs2.provider.AbstractFileName; //导入依赖的package包/类
/**
 * Creates a layered file system.  This method is called if the file system
 * is not cached.
 *
 * @param scheme The URI scheme.
 * @param file   The file to create the file system on top of.
 * @return The file system.
 */
@Override
protected FileSystem doCreateFileSystem(final String scheme,
                                        final FileObject file,
                                        final FileSystemOptions fileSystemOptions)
    throws FileSystemException
{
    final AbstractFileName rootName =
        new LayeredFileName(scheme, file.getName(), FileName.ROOT_PATH, FileType.FOLDER);
    return new ZipFileSystem(rootName, file, fileSystemOptions);
}
 
开发者ID:wso2,项目名称:wso2-commons-vfs,代码行数:19,代码来源:ZipFileProvider.java

示例13: doCreateFileSystem

import org.apache.commons.vfs2.provider.AbstractFileName; //导入依赖的package包/类
/**
 * Creates a layered file system.  This method is called if the file system
 * is not cached.
 *
 * @param scheme The URI scheme.
 * @param file   The file to create the file system on top of.
 * @return The file system.
 */
@Override
protected FileSystem doCreateFileSystem(final String scheme,
                                        final FileObject file,
                                        final FileSystemOptions fileSystemOptions)
    throws FileSystemException
{
    final AbstractFileName name =
        new LayeredFileName(scheme, file.getName(), FileName.ROOT_PATH, FileType.FOLDER);
    return new JarFileSystem(name, file, fileSystemOptions);
}
 
开发者ID:wso2,项目名称:wso2-commons-vfs,代码行数:19,代码来源:JarFileProvider.java

示例14: createFile

import org.apache.commons.vfs2.provider.AbstractFileName; //导入依赖的package包/类
/**
 * Creates a file object.
 */
@Override
protected FileObject createFile(final AbstractFileName name) throws FileSystemException
{
    // Create the file
    return new LocalFile(this, rootFile, name);
}
 
开发者ID:wso2,项目名称:wso2-commons-vfs,代码行数:10,代码来源:LocalFileSystem.java

示例15: LocalFile

import org.apache.commons.vfs2.provider.AbstractFileName; //导入依赖的package包/类
/**
 * Creates a non-root file.
 */
protected LocalFile(final LocalFileSystem fileSystem,
                    final String rootFile,
                    final AbstractFileName name) throws FileSystemException
{
    super(name, fileSystem);
    this.rootFile = rootFile;
}
 
开发者ID:wso2,项目名称:wso2-commons-vfs,代码行数:11,代码来源:LocalFile.java


注:本文中的org.apache.commons.vfs2.provider.AbstractFileName类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。