本文整理了Java中org.apache.commons.io.FilenameUtils.doGetFullPath()
方法的一些代码示例,展示了FilenameUtils.doGetFullPath()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FilenameUtils.doGetFullPath()
方法的具体详情如下:
包路径:org.apache.commons.io.FilenameUtils
类名称:FilenameUtils
方法名:doGetFullPath
[英]Does the work of getting the path.
[中]完成获取路径的工作。
代码示例来源:origin: commons-io/commons-io
/**
* Gets the full path from a full filename, which is the prefix + path.
* <p>
* This method will handle a file in either Unix or Windows format.
* The method is entirely text based, and returns the text before and
* including the last forward or backslash.
* <pre>
* C:\a\b\c.txt --> C:\a\b\
* ~/a/b/c.txt --> ~/a/b/
* a.txt --> ""
* a/b/c --> a/b/
* a/b/c/ --> a/b/c/
* C: --> C:
* C:\ --> C:\
* ~ --> ~/
* ~/ --> ~/
* ~user --> ~user/
* ~user/ --> ~user/
* </pre>
* <p>
* The output will be the same irrespective of the machine that the code is running on.
*
* @param filename the filename to query, null returns null
* @return the path of the file, an empty string if none exists, null if invalid
*/
public static String getFullPath(final String filename) {
return doGetFullPath(filename, true);
}
代码示例来源:origin: commons-io/commons-io
/**
* Gets the full path from a full filename, which is the prefix + path,
* and also excluding the final directory separator.
* <p>
* This method will handle a file in either Unix or Windows format.
* The method is entirely text based, and returns the text before the
* last forward or backslash.
* <pre>
* C:\a\b\c.txt --> C:\a\b
* ~/a/b/c.txt --> ~/a/b
* a.txt --> ""
* a/b/c --> a/b
* a/b/c/ --> a/b/c
* C: --> C:
* C:\ --> C:\
* ~ --> ~
* ~/ --> ~
* ~user --> ~user
* ~user/ --> ~user
* </pre>
* <p>
* The output will be the same irrespective of the machine that the code is running on.
*
* @param filename the filename to query, null returns null
* @return the path of the file, an empty string if none exists, null if invalid
*/
public static String getFullPathNoEndSeparator(final String filename) {
return doGetFullPath(filename, false);
}
代码示例来源:origin: org.apache.commons/commons-io
/**
* Gets the full path from a full filename, which is the prefix + path.
* <p>
* This method will handle a file in either Unix or Windows format.
* The method is entirely text based, and returns the text before and
* including the last forward or backslash.
* <pre>
* C:\a\b\c.txt --> C:\a\b\
* ~/a/b/c.txt --> ~/a/b/
* a.txt --> ""
* a/b/c --> a/b/
* a/b/c/ --> a/b/c/
* C: --> C:
* C:\ --> C:\
* ~ --> ~/
* ~/ --> ~/
* ~user --> ~user/
* ~user/ --> ~user/
* </pre>
* <p>
* The output will be the same irrespective of the machine that the code is running on.
*
* @param filename the filename to query, null returns null
* @return the path of the file, an empty string if none exists, null if invalid
*/
public static String getFullPath(String filename) {
return doGetFullPath(filename, true);
}
代码示例来源:origin: org.apache.commons/commons-io
/**
* Gets the full path from a full filename, which is the prefix + path,
* and also excluding the final directory separator.
* <p>
* This method will handle a file in either Unix or Windows format.
* The method is entirely text based, and returns the text before the
* last forward or backslash.
* <pre>
* C:\a\b\c.txt --> C:\a\b
* ~/a/b/c.txt --> ~/a/b
* a.txt --> ""
* a/b/c --> a/b
* a/b/c/ --> a/b/c
* C: --> C:
* C:\ --> C:\
* ~ --> ~
* ~/ --> ~
* ~user --> ~user
* ~user/ --> ~user
* </pre>
* <p>
* The output will be the same irrespective of the machine that the code is running on.
*
* @param filename the filename to query, null returns null
* @return the path of the file, an empty string if none exists, null if invalid
*/
public static String getFullPathNoEndSeparator(String filename) {
return doGetFullPath(filename, false);
}
代码示例来源:origin: org.uberfire/vfs-model
/**
* Gets the full path from a full filename, which is the prefix + path.
* <p>
* This method will handle a file in either Unix or Windows format.
* The method is entirely text based, and returns the text before and
* including the last forward or backslash.
* <pre>
* C:\a\b\c.txt --> C:\a\b\
* ~/a/b/c.txt --> ~/a/b/
* a.txt --> ""
* a/b/c --> a/b/
* a/b/c/ --> a/b/c/
* C: --> C:
* C:\ --> C:\
* ~ --> ~/
* ~/ --> ~/
* ~user --> ~user/
* ~user/ --> ~user/
* </pre>
* <p>
* The output will be the same irrespective of the machine that the code is running on.
*
* @param filename the filename to query, null returns null
* @return the path of the file, an empty string if none exists, null if invalid
*/
public static String getFullPath(String filename) {
return doGetFullPath(filename, true);
}
代码示例来源:origin: org.apache.commons/com.springsource.org.apache.commons.io
/**
* Gets the full path from a full filename, which is the prefix + path.
* <p>
* This method will handle a file in either Unix or Windows format.
* The method is entirely text based, and returns the text before and
* including the last forward or backslash.
* <pre>
* C:\a\b\c.txt --> C:\a\b\
* ~/a/b/c.txt --> ~/a/b/
* a.txt --> ""
* a/b/c --> a/b/
* a/b/c/ --> a/b/c/
* C: --> C:
* C:\ --> C:\
* ~ --> ~/
* ~/ --> ~/
* ~user --> ~user/
* ~user/ --> ~user/
* </pre>
* <p>
* The output will be the same irrespective of the machine that the code is running on.
*
* @param filename the filename to query, null returns null
* @return the path of the file, an empty string if none exists, null if invalid
*/
public static String getFullPath(String filename) {
return doGetFullPath(filename, true);
}
代码示例来源:origin: org.onosproject/onlab-thirdparty
/**
* Gets the full path from a full filename, which is the prefix + path.
* <p>
* This method will handle a file in either Unix or Windows format.
* The method is entirely text based, and returns the text before and
* including the last forward or backslash.
* <pre>
* C:\a\b\c.txt --> C:\a\b\
* ~/a/b/c.txt --> ~/a/b/
* a.txt --> ""
* a/b/c --> a/b/
* a/b/c/ --> a/b/c/
* C: --> C:
* C:\ --> C:\
* ~ --> ~/
* ~/ --> ~/
* ~user --> ~user/
* ~user/ --> ~user/
* </pre>
* <p>
* The output will be the same irrespective of the machine that the code is running on.
*
* @param filename the filename to query, null returns null
* @return the path of the file, an empty string if none exists, null if invalid
*/
public static String getFullPath(String filename) {
return doGetFullPath(filename, true);
}
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
/**
* Gets the full path from a full filename, which is the prefix + path.
* <p>
* This method will handle a file in either Unix or Windows format.
* The method is entirely text based, and returns the text before and
* including the last forward or backslash.
* <pre>
* C:\a\b\c.txt --> C:\a\b\
* ~/a/b/c.txt --> ~/a/b/
* a.txt --> ""
* a/b/c --> a/b/
* a/b/c/ --> a/b/c/
* C: --> C:
* C:\ --> C:\
* ~ --> ~/
* ~/ --> ~/
* ~user --> ~user/
* ~user/ --> ~user/
* </pre>
* <p>
* The output will be the same irrespective of the machine that the code is running on.
*
* @param filename the filename to query, null returns null
* @return the path of the file, an empty string if none exists, null if invalid
*/
public static String getFullPath(final String filename) {
return doGetFullPath(filename, true);
}
代码示例来源:origin: org.kie.commons/kie-nio2-model
/**
* Gets the full path from a full filename, which is the prefix + path,
* and also excluding the final directory separator.
* <p>
* This method will handle a file in either Unix or Windows format.
* The method is entirely text based, and returns the text before the
* last forward or backslash.
* <pre>
* C:\a\b\c.txt --> C:\a\b
* ~/a/b/c.txt --> ~/a/b
* a.txt --> ""
* a/b/c --> a/b
* a/b/c/ --> a/b/c
* C: --> C:
* C:\ --> C:\
* ~ --> ~
* ~/ --> ~
* ~user --> ~user
* ~user/ --> ~user
* </pre>
* <p>
* The output will be the same irrespective of the machine that the code is running on.
*
* @param filename the filename to query, null returns null
* @return the path of the file, an empty string if none exists, null if invalid
*/
public static String getFullPathNoEndSeparator(String filename) {
return doGetFullPath(filename, false);
}
代码示例来源:origin: org.apache.commons/com.springsource.org.apache.commons.io
/**
* Gets the full path from a full filename, which is the prefix + path,
* and also excluding the final directory separator.
* <p>
* This method will handle a file in either Unix or Windows format.
* The method is entirely text based, and returns the text before the
* last forward or backslash.
* <pre>
* C:\a\b\c.txt --> C:\a\b
* ~/a/b/c.txt --> ~/a/b
* a.txt --> ""
* a/b/c --> a/b
* a/b/c/ --> a/b/c
* C: --> C:
* C:\ --> C:\
* ~ --> ~
* ~/ --> ~
* ~user --> ~user
* ~user/ --> ~user
* </pre>
* <p>
* The output will be the same irrespective of the machine that the code is running on.
*
* @param filename the filename to query, null returns null
* @return the path of the file, an empty string if none exists, null if invalid
*/
public static String getFullPathNoEndSeparator(String filename) {
return doGetFullPath(filename, false);
}
代码示例来源:origin: Nextdoor/bender
/**
* Gets the full path from a full filename, which is the prefix + path.
* <p>
* This method will handle a file in either Unix or Windows format.
* The method is entirely text based, and returns the text before and
* including the last forward or backslash.
* <pre>
* C:\a\b\c.txt --> C:\a\b\
* ~/a/b/c.txt --> ~/a/b/
* a.txt --> ""
* a/b/c --> a/b/
* a/b/c/ --> a/b/c/
* C: --> C:
* C:\ --> C:\
* ~ --> ~/
* ~/ --> ~/
* ~user --> ~user/
* ~user/ --> ~user/
* </pre>
* <p>
* The output will be the same irrespective of the machine that the code is running on.
*
* @param filename the filename to query, null returns null
* @return the path of the file, an empty string if none exists, null if invalid
*/
public static String getFullPath(String filename) {
return doGetFullPath(filename, true);
}
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
/**
* Gets the full path from a full filename, which is the prefix + path,
* and also excluding the final directory separator.
* <p>
* This method will handle a file in either Unix or Windows format.
* The method is entirely text based, and returns the text before the
* last forward or backslash.
* <pre>
* C:\a\b\c.txt --> C:\a\b
* ~/a/b/c.txt --> ~/a/b
* a.txt --> ""
* a/b/c --> a/b
* a/b/c/ --> a/b/c
* C: --> C:
* C:\ --> C:\
* ~ --> ~
* ~/ --> ~
* ~user --> ~user
* ~user/ --> ~user
* </pre>
* <p>
* The output will be the same irrespective of the machine that the code is running on.
*
* @param filename the filename to query, null returns null
* @return the path of the file, an empty string if none exists, null if invalid
*/
public static String getFullPathNoEndSeparator(final String filename) {
return doGetFullPath(filename, false);
}
代码示例来源:origin: Nextdoor/bender
/**
* Gets the full path from a full filename, which is the prefix + path,
* and also excluding the final directory separator.
* <p>
* This method will handle a file in either Unix or Windows format.
* The method is entirely text based, and returns the text before the
* last forward or backslash.
* <pre>
* C:\a\b\c.txt --> C:\a\b
* ~/a/b/c.txt --> ~/a/b
* a.txt --> ""
* a/b/c --> a/b
* a/b/c/ --> a/b/c
* C: --> C:
* C:\ --> C:\
* ~ --> ~
* ~/ --> ~
* ~user --> ~user
* ~user/ --> ~user
* </pre>
* <p>
* The output will be the same irrespective of the machine that the code is running on.
*
* @param filename the filename to query, null returns null
* @return the path of the file, an empty string if none exists, null if invalid
*/
public static String getFullPathNoEndSeparator(String filename) {
return doGetFullPath(filename, false);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-io
/**
* Gets the full path from a full filename, which is the prefix + path.
* <p>
* This method will handle a file in either Unix or Windows format.
* The method is entirely text based, and returns the text before and
* including the last forward or backslash.
* <pre>
* C:\a\b\c.txt --> C:\a\b\
* ~/a/b/c.txt --> ~/a/b/
* a.txt --> ""
* a/b/c --> a/b/
* a/b/c/ --> a/b/c/
* C: --> C:
* C:\ --> C:\
* ~ --> ~/
* ~/ --> ~/
* ~user --> ~user/
* ~user/ --> ~user/
* </pre>
* <p>
* The output will be the same irrespective of the machine that the code is running on.
*
* @param filename the filename to query, null returns null
* @return the path of the file, an empty string if none exists, null if invalid
*/
public static String getFullPath(String filename) {
return doGetFullPath(filename, true);
}
代码示例来源:origin: org.kie.commons/kie-nio2-model
/**
* Gets the full path from a full filename, which is the prefix + path.
* <p>
* This method will handle a file in either Unix or Windows format.
* The method is entirely text based, and returns the text before and
* including the last forward or backslash.
* <pre>
* C:\a\b\c.txt --> C:\a\b\
* ~/a/b/c.txt --> ~/a/b/
* a.txt --> ""
* a/b/c --> a/b/
* a/b/c/ --> a/b/c/
* C: --> C:
* C:\ --> C:\
* ~ --> ~/
* ~/ --> ~/
* ~user --> ~user/
* ~user/ --> ~user/
* </pre>
* <p>
* The output will be the same irrespective of the machine that the code is running on.
*
* @param filename the filename to query, null returns null
* @return the path of the file, an empty string if none exists, null if invalid
*/
public static String getFullPath(String filename) {
return doGetFullPath(filename, true);
}
代码示例来源:origin: io.github.stephenc.docker/docker-client-shaded
/**
* Gets the full path from a full filename, which is the prefix + path.
* <p>
* This method will handle a file in either Unix or Windows format.
* The method is entirely text based, and returns the text before and
* including the last forward or backslash.
* <pre>
* C:\a\b\c.txt --> C:\a\b\
* ~/a/b/c.txt --> ~/a/b/
* a.txt --> ""
* a/b/c --> a/b/
* a/b/c/ --> a/b/c/
* C: --> C:
* C:\ --> C:\
* ~ --> ~/
* ~/ --> ~/
* ~user --> ~user/
* ~user/ --> ~user/
* </pre>
* <p>
* The output will be the same irrespective of the machine that the code is running on.
*
* @param filename the filename to query, null returns null
* @return the path of the file, an empty string if none exists, null if invalid
*/
public static String getFullPath(final String filename) {
return doGetFullPath(filename, true);
}
代码示例来源:origin: org.uberfire/vfs-model
/**
* Gets the full path from a full filename, which is the prefix + path,
* and also excluding the final directory separator.
* <p>
* This method will handle a file in either Unix or Windows format.
* The method is entirely text based, and returns the text before the
* last forward or backslash.
* <pre>
* C:\a\b\c.txt --> C:\a\b
* ~/a/b/c.txt --> ~/a/b
* a.txt --> ""
* a/b/c --> a/b
* a/b/c/ --> a/b/c
* C: --> C:
* C:\ --> C:\
* ~ --> ~
* ~/ --> ~
* ~user --> ~user
* ~user/ --> ~user
* </pre>
* <p>
* The output will be the same irrespective of the machine that the code is running on.
*
* @param filename the filename to query, null returns null
* @return the path of the file, an empty string if none exists, null if invalid
*/
public static String getFullPathNoEndSeparator(String filename) {
return doGetFullPath(filename, false);
}
代码示例来源:origin: io.github.stephenc.docker/docker-client-shaded
/**
* Gets the full path from a full filename, which is the prefix + path,
* and also excluding the final directory separator.
* <p>
* This method will handle a file in either Unix or Windows format.
* The method is entirely text based, and returns the text before the
* last forward or backslash.
* <pre>
* C:\a\b\c.txt --> C:\a\b
* ~/a/b/c.txt --> ~/a/b
* a.txt --> ""
* a/b/c --> a/b
* a/b/c/ --> a/b/c
* C: --> C:
* C:\ --> C:\
* ~ --> ~
* ~/ --> ~
* ~user --> ~user
* ~user/ --> ~user
* </pre>
* <p>
* The output will be the same irrespective of the machine that the code is running on.
*
* @param filename the filename to query, null returns null
* @return the path of the file, an empty string if none exists, null if invalid
*/
public static String getFullPathNoEndSeparator(final String filename) {
return doGetFullPath(filename, false);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-io
/**
* Gets the full path from a full filename, which is the prefix + path,
* and also excluding the final directory separator.
* <p>
* This method will handle a file in either Unix or Windows format.
* The method is entirely text based, and returns the text before the
* last forward or backslash.
* <pre>
* C:\a\b\c.txt --> C:\a\b
* ~/a/b/c.txt --> ~/a/b
* a.txt --> ""
* a/b/c --> a/b
* a/b/c/ --> a/b/c
* C: --> C:
* C:\ --> C:\
* ~ --> ~
* ~/ --> ~
* ~user --> ~user
* ~user/ --> ~user
* </pre>
* <p>
* The output will be the same irrespective of the machine that the code is running on.
*
* @param filename the filename to query, null returns null
* @return the path of the file, an empty string if none exists, null if invalid
*/
public static String getFullPathNoEndSeparator(String filename) {
return doGetFullPath(filename, false);
}
代码示例来源:origin: org.onosproject/onlab-thirdparty
/**
* Gets the full path from a full filename, which is the prefix + path,
* and also excluding the final directory separator.
* <p>
* This method will handle a file in either Unix or Windows format.
* The method is entirely text based, and returns the text before the
* last forward or backslash.
* <pre>
* C:\a\b\c.txt --> C:\a\b
* ~/a/b/c.txt --> ~/a/b
* a.txt --> ""
* a/b/c --> a/b
* a/b/c/ --> a/b/c
* C: --> C:
* C:\ --> C:\
* ~ --> ~
* ~/ --> ~
* ~user --> ~user
* ~user/ --> ~user
* </pre>
* <p>
* The output will be the same irrespective of the machine that the code is running on.
*
* @param filename the filename to query, null returns null
* @return the path of the file, an empty string if none exists, null if invalid
*/
public static String getFullPathNoEndSeparator(String filename) {
return doGetFullPath(filename, false);
}
内容来源于网络,如有侵权,请联系作者删除!