Returns the filename of the resource with extension.

@return Filename of the GVRAndroidResource. May return null if the
resource is not associated with any file
774771
public String getResourceFilename() {
        switch (resourceType) {
        case ANDROID_ASSETS:
            return assetPath
                    .substring(assetPath.lastIndexOf(File.separator) + 1);

        case ANDROID_RESOURCE:
            return resourceFilePath.substring(
                    resourceFilePath.lastIndexOf(File.separator) + 1);

        case LINUX_FILESYSTEM:
            return filePath.substring(filePath.lastIndexOf(File.separator) + 1);

        case NETWORK:
            return url.getPath().substring(url.getPath().lastIndexOf("/") + 1);

        case INPUT_STREAM:
            return inputStreamName;

        default:
            return null;
        }
    }
1324337
public IResource getResource()
	{
		try
		{
			final IResource resource = ensureMarker().getResource();
			if (!resource.equals(getWorkspaceRoot()))
			{
				return resource;
			}
		} catch (CoreException e)
		{
			VdmDebugPlugin.log(e);
		}
		return null;
	}
643653
public static String getExtension(String fileName) {
        if (fileName.contains(".")) {
            return fileName.substring(fileName.lastIndexOf(".") + 1);
        }
        return "png";
    }
319823
private static String getFileName(Resource file) {
	String name = file.getName();
	int pos = name.lastIndexOf(".");

	if (pos == -1) return name;
	return name.substring(0, pos);
    }
382626
public String getPathName()
    {
    if( pathName_ == null)
      {
      StringBuilder pathName = new StringBuilder();

      IVarDef parent = getParent();
      if( parent != null)
        {
        pathName
          .append( parent.getPathName())
          .append( '.');
        }

      String name = getName();
      if( name != null)
        {
        pathName.append( name);
        }

      pathName_ = pathName.toString();
      }

    return pathName_;
    }
623407
public function getResourceUri()
    {
        $extensionLength = strlen($this->getExtension());
        $pathInfo = $this->getPathInfo();
        if ($extensionLength > 0) {
            return substr($pathInfo, 0, -($extensionLength + 1));
        }

        return $pathInfo;
    }
44153
public String fileName()
    {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "fileName", this);
        if (tc.isEntryEnabled())
            Tr.exit(tc, "fileName", _fileName);
        return _fileName;
    }
187831
public function getExtension()
    {
        if (!isset($this->file['name'])) {
            return null;
        }

        $extension = pathinfo(
            $this->file['name'],
            PATHINFO_EXTENSION
        );

        return strtolower($extension);
    }
1033309
private String getExtension(String fileName) {
		if (fileName == null) {
            return null;
        }

		String ext = null;
		int i = fileName.lastIndexOf('.');

		if (i > 0 && i < fileName.length() - 1) {
			ext = fileName.substring(i + 1).toLowerCase();
		}
		return ext;
	}
205773
public String toFilename() {
        if (m_filename == null) { // lazily convert, since not always needed
            m_filename = m_normalized.replaceAll(":", "_");
            if (m_filename.endsWith(".")) {
                m_filename =
                        m_filename.substring(0, m_filename.length() - 1) + "%";
            }
        }
        return m_filename;
    }
648218
public function getFilenameWithExtension() {
		if ($this->extension === null) {
			return $this->filename;
		}
		else {
			return $this->filename . '.' . $this->extension;
		}
	}
938116
String getPathName(boolean url) {
        if (pathName == null || pathName.isEmpty()) {
            VirtualFile[] path = getParentFiles();
            final StringBuilder builder = new StringBuilder(path.length * 30 + 50);
            for (int i = path.length - 1; i > -1; i--) {
                final VirtualFile parent = path[i].parent;
                if (parent == null) {
                    builder.append(path[i].name);
                } else {
                    if (parent.parent != null) {
                        builder.append('/');
                    }
                    builder.append(path[i].name);
                }
            }
            pathName = builder.toString();
        }
        // Perhaps this should be cached to avoid the fs stat call?
        return (url && isDirectory()) ? pathName.concat("/") : pathName;
    }
976345
@Override
    public String getFilename() {
        try {
            if (hasDescriptionProperty(FILENAME)) {
                return getDescriptionProperty(FILENAME).getString().replace(FIELD_DELIMITER + XSDstring.getURI(), "");
            }
            return node.getName();
        } catch (final RepositoryException e) {
            throw new RepositoryRuntimeException(e);
        }
    }
765943
@Override
    public Path getFileName() {
        // Root and empty String has no file name
        if (path.length() == 0 || path.equals(ArchivePaths.root().get())) {
            return null;
        } else {
            final List<String> tokens = tokenize(this);
            // Furthest out
            final Path fileName = new ShrinkWrapPath(tokens.get(tokens.size() - 1), this.fileSystem);
            return fileName;
        }
    }
148108
private String getFileNameFromDisposition() {
		String fileName = null;
		final String desposition = header(Header.CONTENT_DISPOSITION);
		if (StrUtil.isNotBlank(desposition)) {
			fileName = ReUtil.get("filename=\"(.*?)\"", desposition, 1);
			if (StrUtil.isBlank(fileName)) {
				fileName = StrUtil.subAfter(desposition, "filename=", true);
			}
		}
		return fileName;
	}
759883
public GVRAndroidResource openResource(String filePath) throws IOException {
        // Error tolerance: Remove initial '/' introduced by file::///filename
        // In this case, the path is interpreted as relative to defaultPath,
        // which is the root of the filesystem.
        if (filePath.startsWith(File.separator)) {
            filePath = filePath.substring(File.separator.length());
        }

        filePath = adaptFilePath(filePath);
        String path;
        int resourceId;

        GVRAndroidResource resourceKey;
        switch (volumeType) {
        case ANDROID_ASSETS:
            // Resolve '..' and '.'
            path = getFullPath(defaultPath, filePath);
            path = new File(path).getCanonicalPath();
            if (path.startsWith(File.separator)) {
                path = path.substring(1);
            }
            resourceKey = new GVRAndroidResource(gvrContext, path);
            break;

            case ANDROID_RESOURCE:
            path = FileNameUtils.getBaseName(filePath);
            resourceId = gvrContext.getContext().getResources().getIdentifier(path, "raw", gvrContext.getContext().getPackageName());
            if (resourceId == 0) {
                throw new FileNotFoundException(filePath + " resource not found");
            }
            resourceKey = new GVRAndroidResource(gvrContext, resourceId);
            break;

        case LINUX_FILESYSTEM:
            resourceKey = new GVRAndroidResource(
                    getFullPath(defaultPath, filePath));
            break;

        case ANDROID_SDCARD:
            String linuxPath = Environment.getExternalStorageDirectory()
                    .getAbsolutePath();
            resourceKey = new GVRAndroidResource(
                    getFullPath(linuxPath, defaultPath, filePath));
            break;

        case INPUT_STREAM:
            resourceKey = new GVRAndroidResource(getFullPath(defaultPath, filePath), volumeInputStream);
            break;

        case NETWORK:
            resourceKey = new GVRAndroidResource(gvrContext,
                    getFullURL(defaultPath, filePath), enableUrlLocalCache);
            break;

        default:
            throw new IOException(
                    String.format("Unrecognized volumeType %s", volumeType));
        }
        return addResource(resourceKey);
    }
485239
public function getFilename()
	{
		$filename = $this->getDisplayName();
		if ($this->getExtension() != '')
		{
			$filename .= '.' . $this->getExtension();
		}
		return $filename;
	}