Obtain properties for the file represented by {@code path}, asynchronously.
<p>
If the file is a link, the link will be followed.

@param path the path to the file
@return a promise for file properties
546261
@Override
    public Promise<FileProps> props(String path) {
        return adapter.toPromise(handler -> vertx.fileSystem().props(path, handler));
    }
761793
protected Properties readConfigFile(String path) {
		Properties props = new Properties();
		// Load properties file
		InputStream is = null;
		try {
			if (path.startsWith(FILE_PREFIX)) {
				if (LOGGER.isDebugEnabled() && !checking)
					LOGGER.debug("Using filesystem properties file location at: " + configLocation);
				is = new FileInputStream(new File(path.substring(FILE_PREFIX.length())));
			} else {
				if (LOGGER.isDebugEnabled() && !checking)
					LOGGER.debug("Reading properties from file at classpath: " + configLocation);
				is = ClassLoaderResourceUtils.getResourceAsStream(path, this);
			}
			loadConfig(props, path, is);

		} catch (IOException e) {
			throw new IllegalArgumentException("jawr configuration could not be found at " + path
					+ ". Make sure parameter is properly set " + "in web.xml. ");
		} finally {
			IOUtils.close(is);
		}

		return props;
	}
20325
public InputStream getResource (String path)
        throws IOException
    {
        String localePath = getLocalePath(path);
        InputStream in;

        // first look for this resource in our default resource bundle
        for (ResourceBundle bundle : _default) {
            // Try a localized version first.
            if (localePath != null) {
                in = bundle.getResource(localePath);
                if (in != null) {
                    return in;
                }
            }
            // If that didn't work, try generic.
            in = bundle.getResource(path);
            if (in != null) {
                return in;
            }
        }

        // fallback next to an unpacked resource file
        File file = getResourceFile(path);
        if (file != null && file.exists()) {
            return new FileInputStream(file);
        }

        // if we still didn't find anything, try the classloader; first try a locale-specific file
        if (localePath != null) {
            in = getInputStreamFromClasspath(PathUtil.appendPath(_rootPath, localePath));
            if (in != null) {
                return in;
            }
        }

        // if we didn't find that, try locale-neutral
        in = getInputStreamFromClasspath(PathUtil.appendPath(_rootPath, path));
        if (in != null) {
            return in;
        }

        // if we still haven't found it, we throw an exception
        throw new FileNotFoundException("Unable to locate resource [path=" + path + "]");
    }
1300801
public @Nonnull Optional<InputStream> getResourceAsStream(@Nonnull String path) {
        ArgumentUtils.requireNonNull("path", path);
        Optional<ResourceLoader> resourceLoader = getSupportingLoader(path);
        if (resourceLoader.isPresent()) {
            return resourceLoader.get().getResourceAsStream(path);
        }
        return Optional.empty();
    }
569369
public List<String> getRoles(String path) {
        List<String> roles = super.getRoles(path);
        roles.add(Role.ASSET_DESIGN);
        return roles;
    }
476162
public void getLink(String path, final I_CmsStringCallback callback) {

        m_apiRoot.getRpcHelper().executeRpc(CmsXmlContentUgcApi.SERVICE.getLink(path, new AsyncCallback<String>() {

            @SuppressWarnings("synthetic-access")
            public void onFailure(Throwable caught) {

                m_apiRoot.handleError(caught, null);
            }

            public void onSuccess(String result) {

                callback.call(result);
            }
        }));
    }
273753
public static Properties loadClasspath(String path) throws IOException {
		InputStream input = PropUtils.class.getClassLoader().getResourceAsStream(path);
		Properties prop = null;
		try {
			prop = load(input);
		} finally {
			IOUtils.close(input);
		}
		return prop;
	}
35566
public Property getPropertyDefinition(String path)
    {
        final List /*<Property>*/ propertyList = getPropertyList();
        for (int i = 0; i < propertyList.size(); i++) {
            Property property = (Property) propertyList.get(i);
            if (property.getPath().equals(path)) {
                return property;
            }
        }
        return null;
    }
814509
public static String readResourceAsStream(String path) {
        try {
            InputStream inputStream = ResourceUtil.getResourceAsStream(path);
            return ResourceUtil.readFromInputStreamIntoString(inputStream);
        } catch (Exception e) {
            throw new DataUtilException("Failed to load resource", e);
        }
    }
989737
public Set<String> getResourcePaths(String path) {

		Set<String> result = new HashSet<String>();
		path = path.replace('/', File.separatorChar);
		File resource = new File(baseDir, path);

		// If the path is not valid throw an exception
		String[] resArray = resource.list();
		if (null == resArray)
			return result;

		// Make the returned dirs end with '/', to match a servletcontext
		// behavior.
		for (int i = 0; i < resArray.length; i++) {

			resArray[i] = path + resArray[i];
			if (isDirectory(resArray[i]))
				resArray[i] += '/';
		}
		result.addAll(Arrays.asList(resArray));

		return result;
	}
1242862
public static String getScript(String path) {
        StringBuilder sb = new StringBuilder();

        InputStream stream = ScriptUtil.class.getClassLoader().getResourceAsStream(path);
        try (BufferedReader br = new BufferedReader(new InputStreamReader(stream))){

            String str;
            while ((str = br.readLine()) != null) {
                sb.append(str).append(System.lineSeparator());
            }

        } catch (IOException e) {
            System.err.println(e.getStackTrace());
        }
        return sb.toString();
    }
1021602
public static String path( String path ) {
		String pathToBase = getPathToBase();
		if( pathToBase == null )
			return path;
		return new File(pathToBase,path).getAbsolutePath();
	}
298890
public static List<File> fileList(String path)
    {
        List<File> fileList = new LinkedList<File>();
        File folder = new File(path);
        if (folder.isDirectory())
            enumerate(folder, fileList);
        else
            fileList.add(folder); // 兼容路径为文件的情况
        return fileList;
    }
621374
private Properties loadProps(final Path path) {
		Properties props = new Properties();
		try {
			InputStream is = Files.newInputStream(path);
			props.load(new InputStreamReader(is, Charset.forName("UTF-8")));
		} catch (IOException ex) {
			throw new IllegalArgumentException("Failed to load properties.", ex);
		}
		return props;
	}
1279176
@Override
	public Expression<?> getProperty(final WQPath path)
	{
		final JPAJoin join = getOrCreateJoin(path.getTail());

		return join.property(path.getHead().getPath());
	}
837806
public static Properties loadProperties(String propertyFilePath){
		Properties prop = new Properties();
		InputStream is = null;
		ClassLoader cl = Thread.currentThread().getContextClassLoader();
		try {
			is = cl.getResourceAsStream(propertyFilePath);
			Assert.notNull(is, "Failed to obtain InputStream for " + propertyFilePath);
			prop.load(is);
			resolveSystemPropertyPlaceholders(prop);
		} 
		catch (Exception e) {
			throw new IllegalStateException("Failed to load configuration properties: " + propertyFilePath, e);
		} 
		finally {
			try {
				is.close();
			} catch (Exception e2) {
				// ignore
			}
		}
		return prop;
	}
258135
public Resource getResource(String path) {
        if (hasContext()) {
            return context.getResource(path);
        }
        return getContext().getResource(getContextPath() + '/' + path);
    }