Home
last modified time | relevance | path

Searched refs:path (Results 1 – 25 of 142) sorted by relevance

123456

/libcore/ojluni/src/main/native/
DUnixFileSystem_md.c61 jfieldID path; member
73 ids.path = (*env)->GetFieldID(env, fileClass, in Java_java_io_UnixFileSystem_initIDs()
81 extern int canonicalize(char *path, const char *out, int len);
89 WITH_PLATFORM_STRING(env, pathname, path) { in Java_java_io_UnixFileSystem_canonicalize0()
91 if (canonicalize((char *)path, in Java_java_io_UnixFileSystem_canonicalize0()
101 } END_PLATFORM_STRING(env, path); in Java_java_io_UnixFileSystem_canonicalize0()
110 statMode(const char *path, int *mode) in statMode() argument
113 if (stat64(path, &sb) == 0) { in statMode()
129 WITH_PLATFORM_STRING(env, abspath, path) { in Java_java_io_UnixFileSystem_getBooleanAttributes0()
132 if (statMode(path, &mode)) { in Java_java_io_UnixFileSystem_getBooleanAttributes0()
[all …]
Dcanonicalize_md.c128 collapse(char *path) in collapse() argument
130 char *names = (path[0] == '/') ? path + 1 : path; /* Preserve first '/' */ in collapse()
214 char path[PATH_MAX + 1]; in canonicalize() local
216 strncpy(path, original, sizeof(path)); in canonicalize()
217 if (path[PATH_MAX] != '\0') { in canonicalize()
221 end = path + strlen(path); in canonicalize()
223 for (p = end; p > path;) { in canonicalize()
226 while ((--p > path) && (*p != '/')); in canonicalize()
227 if (p == path) break; in canonicalize()
231 r = realpath(path, resolved); in canonicalize()
[all …]
/libcore/ojluni/src/main/java/java/nio/file/
DFiles.java96 private static FileSystemProvider provider(Path path) { in provider() argument
97 return path.getFileSystem().provider(); in provider()
149 public static InputStream newInputStream(Path path, OpenOption... options)
152 return provider(path).newInputStream(path, options);
213 public static OutputStream newOutputStream(Path path, OpenOption... options)
216 return provider(path).newOutputStream(path, options);
356 public static SeekableByteChannel newByteChannel(Path path,
361 return provider(path).newByteChannel(path, options, attrs);
402 public static SeekableByteChannel newByteChannel(Path path, OpenOption... options)
407 return newByteChannel(path, set);
[all …]
DSecureDirectoryStream.java97 SecureDirectoryStream<T> newDirectoryStream(T path, LinkOption... options) in newDirectoryStream() argument
148 SeekableByteChannel newByteChannel(T path, in newByteChannel() argument
178 void deleteFile(T path) throws IOException; in deleteFile() argument
206 void deleteDirectory(T path) throws IOException; in deleteDirectory() argument
309 <V extends FileAttributeView> V getFileAttributeView(T path, in getFileAttributeView() argument
/libcore/ojluni/src/main/java/java/net/
DURLStreamHandler.java129 String path = u.getPath(); in parseURL() local
269 path = null; in parseURL()
285 path = spec.substring(start, limit); in parseURL()
286 } else if (path != null && path.length() > 0) { in parseURL()
288 int ind = path.lastIndexOf('/'); in parseURL()
292 path = path.substring(0, ind + 1) + seperator + in parseURL()
297 path = seperator + spec.substring(start, limit); in parseURL()
308 if (path == null) in parseURL()
309 path = ""; in parseURL()
316 while ((i = path.indexOf("/./")) >= 0) { in parseURL()
[all …]
DURI.java486 private transient String path; // null ==> opaque field in URI
662 String path, String query, String fragment) in URI() argument
667 path, query, fragment); in URI()
668 checkPath(s, scheme, path); in URI()
735 String path, String query, String fragment) in URI() argument
740 path, query, fragment); in URI()
741 checkPath(s, scheme, path); in URI()
767 public URI(String scheme, String host, String path, String fragment) in URI() argument
770 this(scheme, null, host, -1, path, null, fragment); in URI()
1129 return path == null; in isOpaque()
[all …]
DCookieManager.java308 String path = uri.getPath(); in put() local
309 if (!path.endsWith("/")) { in put()
310 int i = path.lastIndexOf("/"); in put()
312 path = path.substring(0, i + 1); in put()
314 path = "/"; in put()
317 cookie.setPath(path); in put()
419 private static String normalizePath(String path) { in normalizePath() argument
420 if (path == null) { in normalizePath()
421 path = ""; in normalizePath()
424 if (!path.endsWith("/")) { in normalizePath()
[all …]
DURL.java204 private transient String path; field in URL
415 path = parts.getPath(); in URL()
419 this.file = path + "?" + query; in URL()
421 this.file = path; in URL()
585 if (context.path != null && context.path.startsWith("/")) in URL()
595 path = context.path; in URL()
695 path = file.substring(0, q); in set()
697 path = file; in set()
717 String authority, String userInfo, String path, in set() argument
725 this.file = (query == null || query.isEmpty()) ? path : path + "?" + query; in set()
[all …]
/libcore/ojluni/src/main/java/sun/nio/fs/
DUnixNativeDispatcher.java39 private static NativeBuffer copyToNativeBuffer(UnixPath path) { in copyToNativeBuffer() argument
40 byte[] cstr = path.getByteArrayForSysCalls(); in copyToNativeBuffer()
47 if (buffer.owner() == path) in copyToNativeBuffer()
51 buffer.setOwner(path); in copyToNativeBuffer()
68 static int open(UnixPath path, int flags, int mode) throws UnixException { in open() argument
69 NativeBuffer buffer = copyToNativeBuffer(path); in open()
82 static int openat(int dfd, byte[] path, int flags, int mode) throws UnixException { in openat() argument
83 NativeBuffer buffer = NativeBuffers.asNativeBuffer(path); in openat()
138 static void unlink(UnixPath path) throws UnixException { in unlink() argument
139 NativeBuffer buffer = copyToNativeBuffer(path); in unlink()
[all …]
DUnixPath.java53 private final byte[] path; field in UnixPath
64 UnixPath(UnixFileSystem fs, byte[] path) { in UnixPath() argument
66 this.path = path; in UnixPath()
161 return path; in asByteArray()
169 return resolve(getFileSystem().defaultDirectory(), path); in getByteArrayForSysCalls()
172 return path; in getByteArrayForSysCalls()
216 while (index < path.length) { in initOffsets()
217 byte c = path[index++]; in initOffsets()
220 while (index < path.length && path[index] != '/') in initOffsets()
230 while (index < path.length) { in initOffsets()
[all …]
DUnixChannelFactory.java103 static FileChannel newFileChannel(int fd, String path, boolean reading, boolean writing) { in newFileChannel() argument
106 return FileChannelImpl.open(fdObj, path, reading, writing, null); in newFileChannel()
113 UnixPath path, in newFileChannel() argument
136 FileDescriptor fdObj = open(dfd, path, pathForPermissionCheck, flags, mode); in newFileChannel()
137 … return FileChannelImpl.open(fdObj, path.toString(), flags.read, flags.write, flags.append, null); in newFileChannel()
143 static FileChannel newFileChannel(UnixPath path, in newFileChannel() argument
148 return newFileChannel(-1, path, null, options, mode); in newFileChannel()
154 static AsynchronousFileChannel newAsynchronousFileChannel(UnixPath path, in newAsynchronousFileChannel() argument
172 FileDescriptor fdObj = open(-1, path, null, flags, mode); in newAsynchronousFileChannel()
181 UnixPath path, in open() argument
[all …]
DLinuxFileStore.java60 UnixPath path = null; in findMountEntry() local
63 path = new UnixPath(fs, rp); in findMountEntry()
69 UnixPath parent = path.getParent(); in findMountEntry()
79 path = parent; in findMountEntry()
85 byte[] dir = path.asByteArray(); in findMountEntry()
96 private boolean isExtendedAttributesEnabled(UnixPath path) { in isExtendedAttributesEnabled() argument
98 int fd = path.openForAttributeAccess(false); in isExtendedAttributesEnabled()
/libcore/ojluni/src/main/java/java/io/
DFile.java171 private final String path; field in File
193 status = (this.path.indexOf('\u0000') < 0) ? PathStatus.CHECKED in isInvalid()
256 this.path = pathname; in File()
266 assert parent.path != null; in File()
267 assert (!parent.path.equals("")); in File()
268 this.path = fs.resolve(parent.path, child); in File()
285 this.path = fs.normalize(pathname); in File()
286 this.prefixLength = fs.prefixLength(this.path); in File()
327 this.path = fs.resolve(fs.normalize(parent), in File()
331 this.path = fs.normalize(child); in File()
[all …]
DUnixFileSystem.java118 public String fromURIPath(String path) { in fromURIPath() argument
119 String p = path; in fromURIPath()
151 public String canonicalize(String path) throws IOException { in canonicalize() argument
153 return canonicalize0(path); in canonicalize()
155 String res = cache.get(path); in canonicalize()
163 dir = parentOrNull(path); in canonicalize()
168 String filename = path.substring(1 + dir.length()); in canonicalize()
177 BlockGuard.getVmPolicy().onPathAccess(path); in canonicalize()
179 res = canonicalize0(path); in canonicalize()
180 cache.put(path, res); in canonicalize()
[all …]
/libcore/tools/testmapping/
Dsave_logs.py29 LOGS_ROOT = os.path.join(ANDROID_REPOSITORY_ROOT, 'out', 'host', 'linux-x86',
31 CTS_LOGS_PATTERN = os.path.join(LOGS_ROOT, '*', '*',
33 LIBCORE_DIR = os.path.join(ANDROID_REPOSITORY_ROOT, 'libcore')
34 DESTINATION_DIR = os.path.join(LIBCORE_DIR, 'smoketest')
39 if not os.path.isdir(LIBCORE_DIR):
41 if not os.path.isdir(DESTINATION_DIR):
69 return sorted(sources, key=os.path.getmtime, reverse=True)
74 return os.path.relpath(source, LOGS_ROOT)
81 (head, tail) = os.path.split(name)
89 assert not os.path.dirname(name)
[all …]
/libcore/dalvik/src/main/java/dalvik/system/
DDexPathList.java298 private static List<File> splitDexPath(String path) { in splitDexPath() argument
299 return splitPaths(path, false); in splitDexPath()
316 for (String path : searchPath.split(File.pathSeparator)) { in splitPaths()
319 StructStat sb = Libcore.os.stat(path); in splitPaths()
327 result.add(new File(path)); in splitPaths()
449 private static String optimizedPathFor(File path, in optimizedPathFor() argument
463 String fileName = path.getName(); in optimizedPathFor()
500 String path = file.getPath(); in makePathElements() local
502 if (path.contains(zipSeparator)) { in makePathElements()
503 String split[] = path.split(zipSeparator, 2); in makePathElements()
[all …]
/libcore/luni/src/main/java/libcore/io/
DBlockGuardOs.java73 @Override public boolean access(String path, int mode) throws ErrnoException { in access() argument
75 BlockGuard.getVmPolicy().onPathAccess(path); in access()
76 return super.access(path, mode); in access()
80 @Override public void chmod(String path, int mode) throws ErrnoException { in chmod() argument
82 BlockGuard.getVmPolicy().onPathAccess(path); in chmod()
83 super.chmod(path, mode); in chmod()
87 @Override public void chown(String path, int uid, int gid) throws ErrnoException { in chown() argument
89 BlockGuard.getVmPolicy().onPathAccess(path); in chown()
90 super.chown(path, uid, gid); in chown()
225 @Override public void lchown(String path, int uid, int gid) throws ErrnoException { in lchown() argument
[all …]
/libcore/ojluni/src/main/java/java/nio/file/spi/
DFileSystemProvider.java339 public FileSystem newFileSystem(Path path, Map<String,?> env) in newFileSystem() argument
373 public InputStream newInputStream(Path path, OpenOption... options) in newInputStream() argument
384 return Channels.newInputStream(Files.newByteChannel(path, options)); in newInputStream()
418 public OutputStream newOutputStream(Path path, OpenOption... options) in newOutputStream() argument
434 return Channels.newOutputStream(newByteChannel(path, opts)); in newOutputStream()
471 public FileChannel newFileChannel(Path path, in newFileChannel() argument
519 public AsynchronousFileChannel newAsynchronousFileChannel(Path path, in newAsynchronousFileChannel() argument
565 public abstract SeekableByteChannel newByteChannel(Path path, in newByteChannel() argument
709 public abstract void delete(Path path) throws IOException; in delete() argument
737 public boolean deleteIfExists(Path path) throws IOException { in deleteIfExists() argument
[all …]
/libcore/ojluni/src/main/java/sun/misc/
DFileURLMapper.java46 String path; field in FileURLMapper
58 if (path != null) { in getPath()
59 return path; in getPath()
63 path = url.getFile(); in getPath()
64 path = ParseUtil.decode (path); in getPath()
66 return path; in getPath()
/libcore/luni/src/main/java/javax/xml/parsers/
DFilePathToURI.java55 public static String filepath2URI(String path){ in filepath2URI() argument
57 if (path == null) in filepath2URI()
61 path = path.replace(separator, '/'); in filepath2URI()
63 int len = path.length(), ch; in filepath2URI()
67 if (len >= 2 && path.charAt(1) == ':') { in filepath2URI()
68 ch = Character.toUpperCase(path.charAt(0)); in filepath2URI()
77 ch = path.charAt(i); in filepath2URI()
98 bytes = path.substring(i).getBytes("UTF-8"); in filepath2URI()
101 return path; in filepath2URI()
/libcore/luni/src/main/java/javax/xml/transform/stream/
DFilePathToURI.java55 public static String filepath2URI(String path){ in filepath2URI() argument
57 if (path == null) in filepath2URI()
61 path = path.replace(separator, '/'); in filepath2URI()
63 int len = path.length(), ch; in filepath2URI()
67 if (len >= 2 && path.charAt(1) == ':') { in filepath2URI()
68 ch = Character.toUpperCase(path.charAt(0)); in filepath2URI()
77 ch = path.charAt(i); in filepath2URI()
98 bytes = path.substring(i).getBytes("UTF-8"); in filepath2URI()
101 return path; in filepath2URI()
/libcore/ojluni/src/main/java/sun/net/www/protocol/ftp/
DFtpURLConnection.java348 private void decodePath(String path) { in decodePath() argument
349 int i = path.indexOf(";type="); in decodePath()
351 String s1 = path.substring(i + 6, path.length()); in decodePath()
361 path = path.substring(0, i); in decodePath()
363 if (path != null && path.length() > 1 && in decodePath()
364 path.charAt(0) == '/') { in decodePath()
365 path = path.substring(1); in decodePath()
367 if (path == null || path.length() == 0) { in decodePath()
368 path = "./"; in decodePath()
370 if (!path.endsWith("/")) { in decodePath()
[all …]
/libcore/luni/src/test/filesystems/src/mypackage/
DMockFileSystemProvider.java50 public FileSystem newFileSystem(Path path, Map<String, ?> env) throws IOException { in newFileSystem() argument
51 return new MockFileSystem(path, env); in newFileSystem()
65 public SeekableByteChannel newByteChannel(Path path, Set<? extends OpenOption> options, in newByteChannel() argument
82 public void delete(Path path) throws IOException { in delete() argument
97 public boolean isSameFile(Path path, Path path2) throws IOException { in isSameFile() argument
102 public boolean isHidden(Path path) throws IOException { in isHidden() argument
107 public FileStore getFileStore(Path path) throws IOException { in getFileStore() argument
112 public void checkAccess(Path path, AccessMode... modes) throws IOException { in checkAccess() argument
117 public <V extends FileAttributeView> V getFileAttributeView(Path path, Class<V> type, in getFileAttributeView() argument
123 public <A extends BasicFileAttributes> A readAttributes(Path path, Class<A> type, in readAttributes() argument
[all …]
/libcore/ojluni/src/main/java/sun/net/www/
DParseUtil.java96 public static String encodePath(String path) { in encodePath() argument
97 return encodePath(path, true); in encodePath()
104 public static String encodePath(String path, boolean flag) { in encodePath() argument
105 char[] retCC = new char[path.length() * 2 + 16]; in encodePath()
107 char[] pathCC = path.toCharArray(); in encodePath()
109 int n = path.length(); in encodePath()
264 String path = file.getAbsolutePath(); in fileToEncodedURL() local
265 path = ParseUtil.encodePath(path); in fileToEncodedURL()
266 if (!path.startsWith("/")) { in fileToEncodedURL()
267 path = "/" + path; in fileToEncodedURL()
[all …]
/libcore/ojluni/src/main/java/java/util/prefs/
DAbstractPreferences.java811 public Preferences node(String path) { in node() argument
815 if (path.equals("")) in node()
817 if (path.equals("/")) in node()
819 if (path.charAt(0) != '/') in node()
820 return node(new StringTokenizer(path, "/", true)); in node()
824 return root.node(new StringTokenizer(path.substring(1), "/", true)); in node()
830 private Preferences node(StringTokenizer path) { in node() argument
831 String token = path.nextToken(); in node()
845 if (!path.hasMoreTokens()) in node()
847 path.nextToken(); // Consume slash in node()
[all …]

123456