Home
last modified time | relevance | path

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

1234567

/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 …]
/libcore/ojluni/src/main/native/
DUnixFileSystem_md.c83 jfieldID path; member
95 ids.path = (*env)->GetFieldID(env, fileClass, in Java_java_io_UnixFileSystem_initIDs()
103 extern int canonicalize(char *path, const char *out, int len,
115 WITH_PLATFORM_STRING(env, pathname, path) { in Java_java_io_UnixFileSystem_canonicalize0()
117 if (canonicalize((char *)path, in Java_java_io_UnixFileSystem_canonicalize0()
127 } END_PLATFORM_STRING(env, path); in Java_java_io_UnixFileSystem_canonicalize0()
136 statMode(const char *path, int *mode) in statMode() argument
139 if (stat64(path, &sb) == 0) { in statMode()
155 WITH_PLATFORM_STRING(env, abspath, path) { in Java_java_io_UnixFileSystem_getBooleanAttributes0()
158 if (statMode(path, &mode)) { in Java_java_io_UnixFileSystem_getBooleanAttributes0()
[all …]
Dcanonicalize_md.c49 char* removeDupSeparator(char *path) in removeDupSeparator() argument
51 if (path == NULL || *path == '\0') { in removeDupSeparator()
55 char *in = path; in removeDupSeparator()
56 char *out = path; in removeDupSeparator()
74 return path; in removeDupSeparator()
169 collapse(char *path, in collapse() argument
174 removeDupSeparator(path); in collapse()
177 bool isPathAbsolute = (path[0] == '/'); in collapse()
178 char *names = isPathAbsolute ? path + 1 : path; /* Preserve first '/' */ in collapse()
283 char path[PATH_MAX]; in canonicalize() local
[all …]
/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 …]
DUnixDomainSocketAddress.java58 private final transient Path path; field in UnixDomainSocketAddress
103 return new Ser(path.toString()); in writeReplace()
129 private UnixDomainSocketAddress(Path path) { in UnixDomainSocketAddress() argument
130 this.path = path; in UnixDomainSocketAddress()
163 public static UnixDomainSocketAddress of(Path path) { in of() argument
164 FileSystem fs = path.getFileSystem(); in of()
168 return new UnixDomainSocketAddress(path); in of()
177 return path; in getPath()
185 return path.hashCode(); in hashCode()
197 return this.path.equals(((UnixDomainSocketAddress) o).path); in equals()
[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 …]
/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, in newFileChannel()
146 static FileChannel newFileChannel(UnixPath path, in newFileChannel() argument
151 return newFileChannel(-1, path, null, options, mode); in newFileChannel()
157 static AsynchronousFileChannel newAsynchronousFileChannel(UnixPath path, in newAsynchronousFileChannel() argument
175 FileDescriptor fdObj = open(-1, path, null, flags, mode); in newAsynchronousFileChannel()
184 UnixPath path, in open() argument
[all …]
/libcore/ojluni/src/main/java/java/io/
DFile.java176 private final String path; field in File
198 status = (this.path.indexOf('\u0000') < 0) ? PathStatus.CHECKED in isInvalid()
261 this.path = pathname; in File()
271 assert parent.path != null; in File()
272 assert (!parent.path.equals("")); in File()
273 this.path = fs.resolve(parent.path, child); in File()
290 this.path = fs.normalize(pathname); in File()
291 this.prefixLength = fs.prefixLength(this.path); in File()
332 this.path = fs.resolve(fs.normalize(parent), in File()
336 this.path = fs.normalize(child); in File()
[all …]
DUnixFileSystem.java153 public String fromURIPath(String path) { in fromURIPath() argument
154 String p = path; in fromURIPath()
190 public String canonicalize(String path) throws IOException { in canonicalize() argument
192 return canonicalize0(path); in canonicalize()
194 String res = cache.get(path); in canonicalize()
202 dir = parentOrNull(path); in canonicalize()
207 String filename = path.substring(1 + dir.length()); in canonicalize()
216 BlockGuard.getVmPolicy().onPathAccess(path); in canonicalize()
218 res = canonicalize0(path); in canonicalize()
219 cache.put(path, res); in canonicalize()
[all …]
/libcore/ojluni/src/test/java/nio/file/Path/
DPathOps.java40 private Path path; field in PathOps
45 path = FileSystems.getDefault().getPath(first, more); in PathOps()
53 path = Path.of(uri); in PathOps()
60 if (path == null) { in checkPath()
83 check(path.getRoot(), expected); in root()
89 check(path.getParent(), expected); in parent()
95 check(path.getFileName(), expected); in name()
101 check(path.getName(index), expected); in element()
107 check(path.subpath(startIndex, endIndex), expected); in subpath()
114 check(path.startsWith(s), true); in starts()
[all …]
DUriImportExport.java44 Path path = Paths.get(s); in testPath() local
45 URI uri = path.toUri(); in testPath()
47 Assert.assertEquals(result, path.toAbsolutePath()); in testPath()
54 Path path = Paths.get(s); in testPath() local
55 URI uri = path.toUri(); in testPath()
58 Assert.assertEquals(result, path.toAbsolutePath()); in testPath()
66 Path path = Paths.get(uri); in testUri() local
67 URI result = path.toUri(); in testUri()
77 Path path = Paths.get(uri); in testBadUri() local
/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/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/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()
226 @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/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/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/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/ojluni/src/main/java/sun/nio/ch/
DUnixDomainSockets.java83 String path = new String(localAddress0(fd), UnixDomainSocketsUtil.getCharset()); in localAddress() local
84 return UnixDomainSocketAddress.of(path); in localAddress()
102 static byte[] getPathBytes(Path path) { in getPathBytes() argument
104 return ((AbstractFileSystemProvider) provider).getSunPathForSocketFile(path); in getPathBytes()
112 byte[] path = getPathBytes(addr); in bind()
113 if (path.length == 0) { in bind()
116 bind0(fd, path); in bind()
139 Path path = Path.of(dir, "socket_" + rnd); in generateTempName() local
140 return UnixDomainSocketAddress.of(path); in generateTempName()
150 static int connect(FileDescriptor fd, Path path) throws IOException { in connect() argument
[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/tools/expected_upstream/
Dcommon_util.py86 path = Path(file_or_bytes)
88 self.openable = lambda mode: path.open(mode)
195 def translate_ojluni_path_to_class_name(path: str) -> str:
205 if not path.endswith('.java'):
208 if path.startswith(OJLUNI_JAVA_BASE_PATH):
210 elif path.startswith(OJLUNI_TEST_PATH):
216 return path[base_len:-5].replace('/', '.')
234 filter(lambda path: path.startswith(input_path), self.existing_paths))
248 path = PurePath(match)
252 child = list(path.parts)[n_parts]
[all …]
/libcore/ojluni/src/tools/build/tools/java.nio-generator/
Dgen_java_nio.py38 import os.path
179 template_file = os.path.join(input_dir, template_name)
180 …output_file = os.path.join(output_dir, output_name + buffer_prefix + "Buffer" + byte_order + ".jav…
181 …output_file_r = os.path.join(output_dir, output_name + buffer_prefix + "BufferR" + byte_order + ".…
200 …bin_ops = os.path.join(template_dir, "X-Buffer-bin.java.template") if primitive == PRIMITIVE_BYTE …
202 template_file = os.path.join(template_dir, "X-Buffer.java.template")
203 output_file = os.path.join(output_dir, buffer_prefix + "Buffer.java")
211 template_file = os.path.join(template_dir, "Heap-X-Buffer.java.template")
212 output_file = os.path.join(output_dir, "Heap" + buffer_prefix + "Buffer.java")
213 output_file_r = os.path.join(output_dir, "Heap" + buffer_prefix + "BufferR.java")
[all …]

1234567