Home
last modified time | relevance | path

Searched refs:getPath (Results 1 – 25 of 94) sorted by relevance

1234

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
DFileWriterTest.java42 fos = new FileOutputStream(f.getPath()); in test_ConstructorLjava_io_File()
48 br = new BufferedReader(new FileReader(f.getPath())); in test_ConstructorLjava_io_File()
98 fos = new FileOutputStream(f.getPath()); in test_ConstructorLjava_io_FileDescriptor()
101 fis = new FileInputStream(f.getPath()); in test_ConstructorLjava_io_FileDescriptor()
115 fos = new FileOutputStream(f.getPath()); in test_ConstructorLjava_lang_String()
118 bw = new BufferedWriter(new FileWriter(f.getPath())); in test_ConstructorLjava_lang_String()
121 br = new BufferedReader(new FileReader(f.getPath())); in test_ConstructorLjava_lang_String()
133 fos = new FileOutputStream(f.getPath()); in test_ConstructorLjava_lang_StringZ()
136 bw = new BufferedWriter(new FileWriter(f.getPath(), true)); in test_ConstructorLjava_lang_StringZ()
139 br = new BufferedReader(new FileReader(f.getPath())); in test_ConstructorLjava_lang_StringZ()
[all …]
DFileTest.java87 File f = new File(tempDirectory.getPath(), "input.tst"); in test_ConstructorLjava_io_FileLjava_lang_String0()
88 …s("Created Incorrect File ", addTrailingSlash(tempDirectory.getPath()) + "input.tst", f.getPath()); in test_ConstructorLjava_io_FileLjava_lang_String0()
119 assertEquals("Assert 1: wrong path result ", path.getPath(), file in test_ConstructorLjava_io_FileLjava_lang_String4()
120 .getPath()); in test_ConstructorLjava_io_FileLjava_lang_String4()
132 String dirName = tempDirectory.getPath(); in test_ConstructorLjava_io_FileLjava_lang_String5()
141 dirName, f.getPath()); in test_ConstructorLjava_io_FileLjava_lang_String5()
171 fileName = addTrailingSlash(tempDirectory.getPath()); in test_ConstructorLjava_lang_String()
175 assertEquals("Created incorrect File", fileName, f.getPath()); in test_ConstructorLjava_lang_String()
189 dirName = tempDirectory.getPath(); in test_ConstructorLjava_lang_StringLjava_lang_String()
201 addTrailingSlash(tempDirectory.getPath()) + "input.tst", in test_ConstructorLjava_lang_StringLjava_lang_String()
[all …]
DFileReaderTest.java43 bw = new BufferedWriter(new FileWriter(f.getPath())); in test_ConstructorLjava_io_File()
58 bw = new BufferedWriter(new FileWriter(f.getPath())); in test_ConstructorLjava_io_FileDescriptor()
61 FileInputStream fis = new FileInputStream(f.getPath()); in test_ConstructorLjava_io_FileDescriptor()
75 bw = new BufferedWriter(new FileWriter(f.getPath())); in test_ConstructorLjava_lang_String()
78 br = new FileReader(f.getPath()); in test_ConstructorLjava_lang_String()
DFileOutputStreamTest.java115 fos = new FileOutputStream(f.getPath(), false); in test_ConstructorLjava_lang_StringZ()
118 fos = new FileOutputStream(f.getPath(), true); in test_ConstructorLjava_lang_StringZ()
122 fis = new FileInputStream(f.getPath()); in test_ConstructorLjava_lang_StringZ()
159 fos = new FileOutputStream(f.getPath()); in test_close()
187 fos = new FileOutputStream(f.getPath()); in test_write$B()
189 fis = new FileInputStream(f.getPath()); in test_write$B()
201 fos = new FileOutputStream(f.getPath()); in test_write$BII()
203 fis = new FileInputStream(f.getPath()); in test_write$BII()
228 fos = new FileOutputStream(f.getPath()); in test_writeI()
230 fis = new FileInputStream(f.getPath()); in test_writeI()
[all …]
/libcore/ojluni/src/main/java/java/io/
DUnixFileSystem.java170 if (isAbsolute(f)) return f.getPath(); in resolve()
175 return resolve(userDir, f.getPath()); in resolve()
302 BlockGuard.getVmPolicy().onPathAccess(f.getPath()); in getBooleanAttributes()
305 int rv = getBooleanAttributes0(f.getPath()); in getBooleanAttributes()
332 return Libcore.os.access(f.getPath(), mode); in checkAccess()
341 BlockGuard.getVmPolicy().onPathAccess(f.getPath()); in getLastModifiedTime()
349 return Libcore.os.stat(f.getPath()).st_size; in getLength()
358 BlockGuard.getVmPolicy().onPathAccess(f.getPath()); in setPermission()
382 Libcore.os.remove(f.getPath()); in delete()
396 BlockGuard.getVmPolicy().onPathAccess(f.getPath()); in list()
[all …]
/libcore/luni/src/test/java/libcore/java/net/
DURITest.java35 assertEquals("/directory/file", uri.getPath()); in testUriParts()
94 assertEquals("/path", uri.getPath()); in testEmptyHost()
100 assertEquals("/path", uri.getPath()); in testNoHost()
106 assertEquals("", uri.getPath()); in testNoPath()
121 assertEquals("", uri.getPath()); in testSingleLetterHost()
192 assertEquals("/path", uri.getPath()); in testPathOnly()
198 assertEquals("", uri.getPath()); in testQueryOnly()
205 assertEquals("", uri.getPath()); in testFragmentOnly()
212 assertEquals("/file@foo", uri.getPath()); in testAtSignInPath()
219 assertEquals("/file:colon", uri.getPath()); in testColonInPath()
[all …]
DURLTest.java53 assertEquals("/directory/file", url.getPath()); in testUrlParts()
300 assertEquals("/path", url.getPath()); in testOmittedHost()
312 assertEquals("/path", url.getPath()); in testNoHost()
321 assertEquals("", url.getPath()); in testNoPath()
333 assertEquals("", url.getPath()); in testEmptyHostAndNoPath()
347 assertEquals("", url.getPath()); in testNoHostAndNoPath()
402 assertEquals("/path", url.getPath()); in testPathOnly()
408 assertEquals("", url.getPath()); in testQueryOnly()
415 assertEquals("", url.getPath()); in testFragmentOnly()
422 assertEquals("/file@foo", url.getPath()); in testAtSignInPath()
[all …]
DOldJarURLConnectionTest.java54 return new URL("jar:file:" + file.getPath() + "!/" + inFile); in createContent()
191 URL fUrl1 = new URL("jar:file:" + file.getPath() + "!/"); in test_getJarFile()
229 URL url = new URL("jar:file:" + file.getPath() + "!/HasAttributes.txt"); in test_setUseCaches()
255 URL fileURL = new URL(u.getPath().substring(0, u.getPath().indexOf("!"))); in test_getJarFileURL()
292 String jarFileName = jarFile.getPath(); in test_getInputStream_DeleteJarFileUsingURLConnection()
/libcore/luni/src/test/java/libcore/dalvik/system/
DBaseDexClassLoaderTest.java140 BaseDexClassLoader cl1 = new PathClassLoader(jar.getPath(), in testReporting()
145 String[] contexts = reporter.loadedDexMapping.get(jar.getPath()).split(";"); in testReporting()
158 BaseDexClassLoader cl1 = new PathClassLoader(jar.getPath(), unknownLoader); in testReportingUnknownLoader()
162 assertEquals(Map.of(jar.getPath(), "=UnsupportedClassLoaderContext="), in testReportingUnknownLoader()
168 BaseDexClassLoader cl1 = new PathClassLoader(jar.getPath(), in testNoReportingAfterResetting()
173 String[] contexts = reporter.loadedDexMapping.get(jar.getPath()).split(";"); in testNoReportingAfterResetting()
186 BaseDexClassLoader cl2 = new PathClassLoader(jar.getPath(), pcl); in testNoReportingAfterResetting()
196 String.join(File.pathSeparator, jar.getPath(), jar2.getPath()), in testReporting_multipleJars()
201 String[] contexts = reporter.loadedDexMapping.get(jar.getPath()).split(";"); in testReporting_multipleJars()
210 String[] contexts2 = reporter.loadedDexMapping.get(jar2.getPath()).split(";"); in testReporting_multipleJars()
[all …]
/libcore/ojluni/src/main/java/sun/nio/fs/
DAbstractPath.java43 return startsWith(getFileSystem().getPath(other)); in startsWith()
48 return endsWith(getFileSystem().getPath(other)); in endsWith()
53 return resolve(getFileSystem().getPath(other)); in resolve()
66 return resolveSibling(getFileSystem().getPath(other)); in resolveSibling()
/libcore/ojluni/src/main/java/java/nio/file/
DPaths.java84 return FileSystems.getDefault().getPath(first, more); in get()
138 return FileSystems.getDefault().provider().getPath(uri); in get()
143 return provider.getPath(uri); in get()
DPath.java147 return FileSystems.getDefault().getPath(first, more); in of()
203 return FileSystems.getDefault().provider().getPath(uri); in of()
208 return provider.getPath(uri); in of()
/libcore/ojluni/src/test/java/io/PrintStream/
DEncodingTest.java84 createFile(getPrintStream(type, file1.getPath(), csn, null)); in test()
85 createFile(getPrintStream(type, file2.getPath(), null, charset)); in test()
87 Assert.assertEquals(Files.readAllLines(Paths.get(file1.getPath()), charset), in test()
88 Files.readAllLines(Paths.get(file2.getPath()), charset)); in test()
/libcore/ojluni/src/test/java/io/PrintWriter/
DEncodingTest.java86 createFile(getWriter(type, file1.getPath(), csn, null)); in test()
87 createFile(getWriter(type, file2.getPath(), null, charset)); in test()
89 Assert.assertEquals(Files.readAllLines(Paths.get(file1.getPath()), charset), in test()
90 Files.readAllLines(Paths.get(file2.getPath()), charset)); in test()
/libcore/luni/src/test/java/libcore/libcore/io/
DMemoryMappedFileTest.java58 MemoryMappedFile.mmapRO(file.getPath()); in testMmapRo_emptyFile()
70 try (MemoryMappedFile memoryMappedFile = MemoryMappedFile.mmapRO(file.getPath())) { in testMmapRo()
80 MemoryMappedFile memoryMappedFile = MemoryMappedFile.mmapRO(file.getPath()); in testMmapRo_close()
102 MemoryMappedFile memoryMappedFile = MemoryMappedFile.mmapRO(file.getPath()); in testReadAfterCloseFails()
123 MemoryMappedFile mappedFile = MemoryMappedFile.mmapRO(file.getPath()); in checkReadByte()
151 MemoryMappedFile mappedFile = MemoryMappedFile.mmapRO(file.getPath()); in checkSeek()
195 MemoryMappedFile mappedFile = MemoryMappedFile.mmapRO(file.getPath()); in checkSkip()
237 MemoryMappedFile mappedFile = MemoryMappedFile.mmapRO(file.getPath()); in testReadShort_bigEndian()
259 MemoryMappedFile mappedFile = MemoryMappedFile.mmapRO(file.getPath()); in testReadShort_littleEndian()
299 MemoryMappedFile mappedFile = MemoryMappedFile.mmapRO(file.getPath()); in testReadInt_bigEndian()
[all …]
DClassPathURLStreamHandlerTest.java69 String fileName = jarFile.getPath(); in testConstructor()
75 String fileName = jarFile.getPath(); in testGetEntryOrNull()
108 String fileName = jarFile.getPath(); in checkGetEntryUrlOrNull()
120 String fileName = jarFile.getPath(); in testIsEntryStored()
136 String fileName = jarFile.getPath(); in testOpenConnection()
/libcore/ojluni/src/test/java/nio/file/Path/
DPathOps.java45 path = FileSystems.getDefault().getPath(first, more); in PathOps()
113 Path s = FileSystems.getDefault().getPath(prefix); in starts()
120 Path s = FileSystems.getDefault().getPath(prefix); in notStarts()
127 Path s = FileSystems.getDefault().getPath(suffix); in ends()
134 Path s = FileSystems.getDefault().getPath(suffix); in notEnds()
170 Path that = FileSystems.getDefault().getPath(other); in relativize()
177 Path that = FileSystems.getDefault().getPath(other); in relativizeFail()
519 Path path = FileSystems.getDefault().getPath("foo"); in npes()
/libcore/support/src/test/java/tests/support/
DSupport_ClassLoaderDalvik.java41 new File(url.getPath()).setReadOnly(); in getClassLoader()
42 return new DexClassLoader(url.getPath(), tmp.getAbsolutePath(), in getClassLoader()
/libcore/ojluni/src/main/java/java/net/
DCookieManager.java302 if (cookie.getPath() == null) { in put()
305 String path = uri.getPath(); in put()
413 return normalizePath(uri.getPath()).startsWith(normalizePath(cookie.getPath())); in pathMatches()
476 final String c1Path = normalizePath(c1.getPath()); in compare()
477 final String c2Path = normalizePath(c2.getPath()); in compare()
/libcore/ojluni/src/main/java/sun/misc/
DFileURLMapper.java57 public String getPath () { in getPath() method in FileURLMapper
73 String s = getPath (); in exists()
/libcore/luni/src/test/java/libcore/java/io/
DFileTest.java145 assertEquals("", f.getPath()); in test_emptyFilename()
428 assertEquals("/test1", file.getPath()); in testBug27731686()
434 assertEquals("/", new File("/", "/").getPath()); in testFileNameNormalization()
435 assertEquals("/", new File("/", "").getPath()); in testFileNameNormalization()
436 assertEquals("/", new File("", "/").getPath()); in testFileNameNormalization()
437 assertEquals("", new File("", "").getPath()); in testFileNameNormalization()
439 assertEquals("/foo/bar", new File("/foo/", "/bar/").getPath()); in testFileNameNormalization()
440 assertEquals("/foo/bar", new File("/foo", "/bar//").getPath()); in testFileNameNormalization()
492 assertEquals(expected, file.getCanonicalFile().getPath()); in assertCanonicalPath()
/libcore/ojluni/src/test/java/util/zip/ZipFile/
DZip64SizeTest.java107 Files.deleteIfExists(FileSystems.getDefault().getPath(ZIP_FILE_NAME)); in deleteFiles()
108 Files.deleteIfExists(FileSystems.getDefault().getPath(LARGE_FILE)); in deleteFiles()
109 Files.deleteIfExists(FileSystems.getDefault().getPath(SMALL_FILE)); in deleteFiles()
/libcore/ojluni/src/test/java/net/UnixDomainSocketAddress/
DLengthTest.java64 Assert.assertTrue(addr.getPath().toString().equals(s), "getPathName.equals(s)"); in expectPass()
67 Assert.assertTrue(addr.getPath().equals(p), "getPath.equals(p)"); in expectPass()
/libcore/luni/src/test/filesystems/src/mypackage/
DMockFileSystem.java50 public Path getPath() { in getPath() method in MockFileSystem
99 public Path getPath(String first, String... more) { in getPath() method in MockFileSystem
/libcore/ojluni/src/test/java/io/FileWriter/
DConstructorTest.java122 return new FileReader(file.getPath(), charset); in getFileReader()
138 return new FileWriter(file.getPath(), charset); in getFileWriter()
142 return new FileWriter(file.getPath(), charset, true); in getFileWriter()

1234