Examples of FileType


Examples of org.apache.commons.vfs.FileType

        final Authority auth = extractToPath(filename, name);

        // Decode and normalise the file name
        UriParser.canonicalizePath(name, 0, name.length(), this);
        UriParser.fixSeparators(name);
        FileType fileType = UriParser.normalisePath(name);
        final String path = name.toString();

        return new GenericFileName(
            auth.scheme,
            auth.hostName,
View Full Code Here

Examples of org.apache.commons.vfs.FileType

        }

        // Decode and normalise the path
        UriParser.canonicalizePath(name, 0, name.length(), this);
        UriParser.fixSeparators(name);
        FileType fileType = UriParser.normalisePath(name);
        final String path = name.toString();

        return new LayeredFileName(scheme, rootUri, path, fileType);
    }
View Full Code Here

Examples of org.apache.commons.vfs.FileType

          //                              actualFilename);
        }

        // Normalise the path.  Do this after extracting the share name,
        // to deal with things like smb://hostname/share/..
        FileType fileType = UriParser.normalisePath(name);
        final String path = name.toString();

        return new SmbFileName(
            auth.scheme,
            auth.hostName,
View Full Code Here

Examples of org.apache.commons.vfs.FileType

        final StringBuffer buffer = new StringBuffer(uri);
        final String scheme = UriParser.extractScheme(uri, buffer);

        UriParser.fixSeparators(buffer);
       
        FileType fileType = UriParser.normalisePath(buffer);
        final String path = buffer.toString();

        // Create the temp file system if it does not exist
        // FileSystem filesystem = findFileSystem( this, (Properties) null);
        FileSystem filesystem = findFileSystem(this, properties);
View Full Code Here

Examples of org.apache.commons.vfs.FileType

       
        // Extract the root prefix
        final String rootFile = extractRootPrefix(filename, name);

        // Normalise the path
        FileType fileType = UriParser.normalisePath(name);

        final String path = name.toString();

        return createFileName(
            scheme,
View Full Code Here

Examples of org.apache.commons.vfs.FileType

        }

        //// UriParser.canonicalizePath(buffer, 0, name.length());

        // Normalise the path
        FileType fileType = UriParser.normalisePath(buffer);

        // Check the name is ok
        final String resolvedPath = buffer.toString();
        if (!AbstractFileName.checkName(realBase.getPath(), resolvedPath, scope))
        {
View Full Code Here

Examples of org.apache.commons.vfs.FileType

  public boolean isCollection() throws IOException {
    if (this.isNull())
      return false;
    try {
      FileObject temp = getFile();
      FileType type = temp.getType();
      if (type == null) {
        type = temp.getName().getType();
      }
      return (type.equals(FileType.FOLDER));
    } catch (IOException e) {
      if (log.isDebugEnabled()) {
        log.warn("Failed to test if resource is a collection.", e);
      } else {
        log.warn("Failed to test if resource is a collection : " + e.getMessage());
View Full Code Here

Examples of org.apache.commons.vfs.FileType

          }
        };
                gc.setTimeInMillis(0);
        FileObjectVFSResource element = (FileObjectVFSResource) itr.next();
        // this is an extra defense against imaginary files.
        FileType ft = null;
        try {
          ft = element.getFile().getType();
        } catch (FileSystemException e) {
        } catch (IOException e) {
        }
View Full Code Here

Examples of org.apache.commons.vfs2.FileType

      scheme = "file";
    }

    UriParser.fixSeparators(buffer);

    FileType fileType = UriParser.normalisePath(buffer);
    final String path = buffer.toString();

    // Create the temp file system if it does not exist
    // FileSystem filesystem = findFileSystem( this, (Properties) null);
    FileSystem filesystem = findFileSystem(this, properties);
View Full Code Here

Examples of org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.HdfsFileStatusProto.FileType

  }
 
  public static HdfsFileStatusProto convert(HdfsFileStatus fs) {
    if (fs == null)
      return null;
    FileType fType = FileType.IS_FILE;
    if (fs.isDir()) {
      fType = FileType.IS_DIR;
    } else if (fs.isSymlink()) {
      fType = FileType.IS_SYMLINK;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.