Searched refs:path (Results 1 - 25 of 92) sorted by relevance

1234

/libcore/luni/src/main/native/
H A Dreadlink.h20 * Fills 'result' with the contents of the symbolic link 'path'. Sets errno and returns false on
25 bool readlink(const char* path, std::string& result);
H A Dreadlink.cpp23 bool readlink(const char* path, std::string& result) { argument
29 ssize_t len = readlink(path, &buf[0], buf.size());
H A Dcanonicalize_path.cpp39 * This differs from realpath(3) mainly in its behavior when a path element does not exist or can
41 * behavior where we just assume the path element was not a symbolic link. This leads to a textual
42 * treatment of ".." from that point in the path, which may actually lead us back to a path we
48 bool canonicalize_path(const char* path, std::string& resolved) { argument
49 // 'path' must be an absolute path.
50 if (path[0] != '/') {
56 if (path[1] == '\0') {
60 // Iterate over path component
[all...]
/libcore/ojluni/src/main/java/java/io/
H A DFileNotFoundException.java76 private FileNotFoundException(String path, String reason) { argument
77 super(path + ((reason == null)
H A DFilePermission.java36 public FilePermission(String path, String actions) { super(""); } argument
H A DFile.java150 private String path; field in class:File
153 * Enum type that indicates the status of a file path.
158 * The flag indicating whether the file path is invalid.
163 * Check if the file has an invalid path. Currently, the inspection of
164 * a file path is very limited, and it only covers Nul character check.
165 * Returning true means the path is definitely invalid/garbage. But
166 * returning false does not guarantee that the path is valid.
168 * @return true if the file path is invalid.
172 status = (this.path.indexOf('\u0000') < 0) ? PathStatus.CHECKED
210 * The system-dependent path
615 slashify(String path, boolean isDirectory) argument
[all...]
H A DUnixFileSystem.java44 new GetPropertyAction("path.separator")).charAt(0);
112 public String fromURIPath(String path) { argument
113 String p = path;
134 // The first cache handles repeated canonicalizations of the same path
138 // prefix cache is conservative and is not used for complex path names.
145 public String canonicalize(String path) throws IOException { argument
147 return canonicalize0(path);
149 String res = cache.get(path);
157 dir = parentOrNull(path);
161 // Hit only in prefix cache; full path i
191 canonicalize0(String path) argument
199 parentOrNull(String path) argument
278 createFileExclusively(String path) argument
283 createFileExclusively0(String path) argument
[all...]
H A DFileSystem.java51 * Return the local filesystem's path-separator character.
59 public abstract String normalize(String path); argument
65 public abstract int prefixLength(String path); argument
82 * Post-process the given URI path string if necessary. This is used on
83 * win32, e.g., to transform "/c:/foo" into "c:/foo". The path string
87 public abstract String fromURIPath(String path); argument
103 public abstract String canonicalize(String path) throws IOException; argument
/libcore/ojluni/src/main/java/sun/misc/
H A DFileURLMapper.java46 String path; field in class:FileURLMapper
53 * @returns the platform specific path corresponding to the URL
58 if (path != null) {
59 return path;
63 path = url.getFile();
64 path = ParseUtil.decode (path);
66 return path;
H A DIoTrace.java128 * @param path
129 * the path of the file
132 public static Object fileReadBegin(String path) { argument
151 * @param path
152 * the path of the file
155 public static Object fileWriteBegin(String path) { argument
/libcore/ojluni/src/main/native/
H A DUnixFileSystem_md.c57 jfieldID path; member in struct:__anon14
69 ids.path = (*env)->GetFieldID(env, fileClass,
70 "path", "Ljava/lang/String;");
75 extern int canonicalize(char *path, const char *out, int len);
83 WITH_PLATFORM_STRING(env, pathname, path) {
85 if (canonicalize(JVM_NativePath((char *)path),
95 } END_PLATFORM_STRING(env, path);
104 statMode(const char *path, int *mode) argument
107 if (stat64(path, &sb) == 0) {
122 WITH_FIELD_PLATFORM_STRING(env, file, ids.path, pat
[all...]
H A Dcanonicalize_md.c121 /* Collapse "." and ".." names in the given path wherever possible.
128 collapse(char *path) argument
130 char *names = (path[0] == '/') ? path + 1 : path; /* Preserve first '/' */
184 /* Convert a pathname to canonical form. The input path is assumed to contain
202 /* First try realpath() on the entire path */
209 /* Something's bogus in the original path, so remove names from the end
212 char path[PATH_MAX + 1]; local
214 strncpy(path, origina
[all...]
H A DFileOutputStream_md.c56 jstring path, jboolean append) {
57 fileOpen(env, this, path, fos_fd,
55 FileOutputStream_open(JNIEnv *env, jobject this, jstring path, jboolean append) argument
/libcore/ojluni/src/main/java/java/net/
H A DURLStreamHandler.java130 String path = u.getPath();
247 // If the authority is defined then the path is defined by the
250 // path = "";
251 path = null;
262 // Parse the file path if any
265 path = spec.substring(start, limit);
266 } else if (path != null && path.length() > 0) {
268 int ind = path.lastIndexOf('/');
272 path
537 setURL(URL u, String protocol, String host, int port, String authority, String userInfo, String path, String query, String ref) argument
[all...]
H A DURI.java105 * [<i>scheme</i><tt><b>:</b></tt>][<tt><b>//</b></tt><i>authority</i>][<i>path</i>][<tt><b>?</b></tt><i>query</i>][<tt><b>#</b></tt><i>fragment</i>]
126 * <p> The path component of a hierarchical URI is itself said to be absolute
128 * relative. The path of a hierarchical URI that is either absolute or
133 * <blockquote><table summary="Describes the components of a URI:scheme,scheme-specific-part,authority,user-info,host,port,path,query,fragment">
141 * <tr><td>path</td><td><tt>String</tt></td></tr>
157 * has a path (though it may be empty) and a scheme-specific-part (which at
158 * least contains the path), and may have any of the other components. If the
169 * and <tt>".."</tt> segments from the path component of a hierarchical URI.
178 * the path of the original is resolved against the path o
491 private transient String path; // null ==> opaque field in class:URI
665 URI(String scheme, String userInfo, String host, int port, String path, String query, String fragment) argument
738 URI(String scheme, String authority, String path, String query, String fragment) argument
772 URI(String scheme, String host, String path, String fragment) argument
1792 checkPath(String s, String scheme, String path) argument
1853 appendSchemeSpecificPart(StringBuffer sb, String opaquePart, String authority, String userInfo, String host, int port, String path, String query) argument
1901 toString(String scheme, String opaquePart, String authority, String userInfo, String host, int port, String path, String query, String fragment) argument
2173 needsNormalization(String path) argument
2230 split(char[] path, int[] segs) argument
2279 join(char[] path, int[] segs) argument
2322 removeDots(char[] path, int[] segs, boolean removeLeading) argument
2383 maybeAddLeadingDot(char[] path, int[] segs) argument
[all...]
H A DCookieManager.java215 // apply path-matches rule (RFC 2965 sec. 3.3.4)
289 // If no path is specified, then by default
290 // the path is the directory of the page/doc
291 String path = uri.getPath();
292 if (!path.endsWith("/")) {
293 int i = path.lastIndexOf("/");
295 path = path.substring(0, i + 1);
297 path = "/";
300 cookie.setPath(path);
397 normalizePath(String path) argument
[all...]
/libcore/luni/src/test/java/tests/security/
H A DCertPathBuilderTest.java40 public abstract void validateCertPath(CertPath path); argument
48 CertPath path = builderResult.getCertPath();
50 assertNotNull("built path is null", path);
52 validateCertPath(path);
/libcore/luni/src/main/java/javax/xml/parsers/
H A DFilePathToURI.java52 // To escape a file path to a URI, by using %HH to represent
55 public static String filepath2URI(String path){ argument
56 // return null if path is null.
57 if (path == null)
61 path = path.replace(separator, '/');
63 int len = path.length(), ch;
67 if (len >= 2 && path.charAt(1) == ':') {
68 ch = Character.toUpperCase(path.charAt(0));
74 // for each character in the path
[all...]
/libcore/luni/src/main/java/javax/xml/transform/stream/
H A DFilePathToURI.java52 // To escape a file path to a URI, by using %HH to represent
55 public static String filepath2URI(String path){ argument
56 // return null if path is null.
57 if (path == null)
61 path = path.replace(separator, '/');
63 int len = path.length(), ch;
67 if (len >= 2 && path.charAt(1) == ':') {
68 ch = Character.toUpperCase(path.charAt(0));
74 // for each character in the path
[all...]
/libcore/luni/src/main/java/android/system/
H A DUnixSocketAddress.java61 // Abstract sockets have a path that starts with (byte) 0.
62 byte[] path = new byte[nameBytes.length + 1];
63 System.arraycopy(nameBytes, 0, path, 1, nameBytes.length);
64 return new UnixSocketAddress(path);
72 // File system sockets have a path that ends with (byte) 0.
73 byte[] path = new byte[pathNameBytes.length + 1];
74 System.arraycopy(pathNameBytes, 0, path, 0, pathNameBytes.length);
75 return new UnixSocketAddress(path);
/libcore/ojluni/src/main/java/sun/net/www/protocol/ftp/
H A DFtpURLConnection.java324 * Decodes the path as per the RFC-1738 specifications.
326 private void decodePath(String path) { argument
327 int i = path.indexOf(";type=");
329 String s1 = path.substring(i + 6, path.length());
339 path = path.substring(0, i);
341 if (path != null && path.length() > 1 &&
342 path
375 cd(String path) argument
[all...]
/libcore/luni/src/main/java/libcore/io/
H A DBlockGuardOs.java67 @Override public boolean access(String path, int mode) throws ErrnoException { argument
69 return os.access(path, mode);
72 @Override public void chmod(String path, int mode) throws ErrnoException { argument
74 os.chmod(path, mode);
77 @Override public void chown(String path, int uid, int gid) throws ErrnoException { argument
79 os.chown(path, uid, gid);
152 @Override public void lchown(String path, int uid, int gid) throws ErrnoException { argument
154 os.lchown(path, uid, gid);
167 @Override public StructStat lstat(String path) throws ErrnoException { argument
169 return os.lstat(path);
172 mkdir(String path, int mode) argument
177 mkfifo(String path, int mode) argument
182 open(String path, int flags, int mode) argument
234 readlink(String path) argument
239 realpath(String path) argument
259 remove(String path) argument
297 stat(String path) argument
302 statvfs(String path) argument
[all...]
/libcore/ojluni/src/main/java/java/util/prefs/
H A DAbstractPreferences.java131 * Our absolute path name.
762 * that the node has not been removed. If <tt>path</tt> is <tt>""</tt>,
763 * this node is returned; if <tt>path</tt> is <tt>"/"</tt>, this node's
764 * root is returned. If the first character in <tt>path</tt> is
765 * not <tt>'/'</tt>, the implementation breaks <tt>path</tt> into
766 * tokens and recursively traverses the path from this node to the
767 * named node, "consuming" a name and a slash from <tt>path</tt> at
784 * <p> If the first character of <tt>path</tt> is <tt>'/'</tt>
785 * (indicating an absolute path name) this preference node's
786 * lock is dropped prior to breaking <tt>path</t
802 node(String path) argument
821 node(StringTokenizer path) argument
865 nodeExists(String path) argument
887 nodeExists(StringTokenizer path) argument
[all...]
/libcore/ojluni/src/main/java/sun/net/www/
H A DParseUtil.java55 // path component of a URI.
57 // These characters are reserved in the path segment as described in
88 * Constructs an encoded version of the specified path string suitable
91 * A path separator is replaced by a forward slash. The string is UTF8
93 * 0x7F or those defined in RFC2396 as reserved or excluded in the path
96 public static String encodePath(String path) { argument
97 return encodePath(path, true);
100 * flag indicates whether path uses platform dependent
101 * File.separatorChar or not. True indicates path uses platform
104 public static String encodePath(String path, boolea argument
310 createURI(String scheme, String authority, String path, String query, String fragment) argument
323 toString(String scheme, String opaquePart, String authority, String userInfo, String host, int port, String path, String query, String fragment) argument
345 appendSchemeSpecificPart(StringBuffer sb, String opaquePart, String authority, String userInfo, String host, int port, String path, String query) argument
529 checkPath(String s, String scheme, String path) argument
[all...]
/libcore/luni/src/test/java/libcore/java/net/
H A DOldAndroidURITest.java26 construct("http://www.google.com/this/is-the/path?query#fragment",
27 "www.google.com", "/this/is-the/path", true);
30 private static void construct(String str, String host, String path, boolean absolute) argument
34 assertEquals(path, uri.getPath());

Completed in 608 milliseconds

1234