Home
last modified time | relevance | path

Searched refs:attrs (Results 1 – 25 of 38) sorted by relevance

12

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/org/xml/sax/ext/
DAttributes2ImplTest.java66 Attributes2Impl attrs = new Attributes2Impl(); in testSetAttributes() local
67 attrs.addAttribute("", "", "john", "string", "doe"); in testSetAttributes()
69 attrs.setAttributes(empty); in testSetAttributes()
70 assertEquals(0, attrs.getLength()); in testSetAttributes()
72 attrs.setAttributes(multi); in testSetAttributes()
74 assertEquals(multi.getURI(i), attrs.getURI(i)); in testSetAttributes()
75 assertEquals(multi.getLocalName(i), attrs.getLocalName(i)); in testSetAttributes()
76 assertEquals(multi.getQName(i), attrs.getQName(i)); in testSetAttributes()
77 assertEquals(multi.getType(i), attrs.getType(i)); in testSetAttributes()
78 assertEquals(multi.getValue(i), attrs.getValue(i)); in testSetAttributes()
[all …]
/libcore/ojluni/src/main/java/sun/nio/fs/
DUnixFileAttributes.java68 UnixFileAttributes attrs = new UnixFileAttributes(); in get() local
70 UnixNativeDispatcher.stat(path, attrs); in get()
72 UnixNativeDispatcher.lstat(path, attrs); in get()
74 return attrs; in get()
79 UnixFileAttributes attrs = new UnixFileAttributes(); in get() local
80 UnixNativeDispatcher.fstat(fd, attrs); in get()
81 return attrs; in get()
88 UnixFileAttributes attrs = new UnixFileAttributes(); in get() local
90 UnixNativeDispatcher.fstatat(dfd, path.asByteArray(), flag, attrs); in get()
91 return attrs; in get()
[all …]
DUnixCopyFile.java128 UnixFileAttributes attrs, in copyDirectory() argument
134 mkdir(target, attrs.mode()); in copyDirectory()
163 fchown(dfd, attrs.uid(), attrs.gid()); in copyDirectory()
164 fchmod(dfd, attrs.mode()); in copyDirectory()
166 chown(target, attrs.uid(), attrs.gid()); in copyDirectory()
167 chmod(target, attrs.mode()); in copyDirectory()
194 attrs.lastAccessTime().to(TimeUnit.MICROSECONDS), in copyDirectory()
195 attrs.lastModifiedTime().to(TimeUnit.MICROSECONDS)); in copyDirectory()
198 attrs.lastAccessTime().to(TimeUnit.MICROSECONDS), in copyDirectory()
199 attrs.lastModifiedTime().to(TimeUnit.MICROSECONDS)); in copyDirectory()
[all …]
DUnixFileAttributeViews.java51 UnixFileAttributes attrs = in readAttributes() local
53 return attrs.asBasicFileAttributes(); in readAttributes()
81 UnixFileAttributes attrs = UnixFileAttributes.get(fd); in setTimes() local
83 lastModifiedTime = attrs.lastModifiedTime(); in setTimes()
85 lastAccessTime = attrs.lastAccessTime(); in setTimes()
189 final void addRequestedPosixAttributes(PosixFileAttributes attrs, in addRequestedPosixAttributes() argument
192 addRequestedBasicAttributes(attrs, builder); in addRequestedPosixAttributes()
194 builder.add(PERMISSIONS_NAME, attrs.permissions()); in addRequestedPosixAttributes()
196 builder.add(OWNER_NAME, attrs.owner()); in addRequestedPosixAttributes()
198 builder.add(GROUP_NAME, attrs.group()); in addRequestedPosixAttributes()
[all …]
DLinuxDosFileAttributeView.java103 DosFileAttributes attrs = readAttributes(); in readAttributes() local
104 addRequestedBasicAttributes(attrs, builder); in readAttributes()
106 builder.add(READONLY_NAME, attrs.isReadOnly()); in readAttributes()
108 builder.add(ARCHIVE_NAME, attrs.isArchive()); in readAttributes()
110 builder.add(SYSTEM_NAME, attrs.isSystem()); in readAttributes()
112 builder.add(HIDDEN_NAME, attrs.isHidden()); in readAttributes()
122 final UnixFileAttributes attrs = UnixFileAttributes.get(fd); in readAttributes() local
128 return attrs.lastModifiedTime(); in readAttributes()
132 return attrs.lastAccessTime(); in readAttributes()
136 return attrs.creationTime(); in readAttributes()
[all …]
DAbstractBasicFileAttributeView.java139 final void addRequestedBasicAttributes(BasicFileAttributes attrs, in addRequestedBasicAttributes() argument
143 builder.add(SIZE_NAME, attrs.size()); in addRequestedBasicAttributes()
145 builder.add(CREATION_TIME_NAME, attrs.creationTime()); in addRequestedBasicAttributes()
147 builder.add(LAST_ACCESS_TIME_NAME, attrs.lastAccessTime()); in addRequestedBasicAttributes()
149 builder.add(LAST_MODIFIED_TIME_NAME, attrs.lastModifiedTime()); in addRequestedBasicAttributes()
151 builder.add(FILE_KEY_NAME, attrs.fileKey()); in addRequestedBasicAttributes()
153 builder.add(IS_DIRECTORY_NAME, attrs.isDirectory()); in addRequestedBasicAttributes()
155 builder.add(IS_REGULAR_FILE_NAME, attrs.isRegularFile()); in addRequestedBasicAttributes()
157 builder.add(IS_SYMBOLIC_LINK_NAME, attrs.isSymbolicLink()); in addRequestedBasicAttributes()
159 builder.add(IS_OTHER_NAME, attrs.isOther()); in addRequestedBasicAttributes()
DUnixFileStoreAttributes.java38 UnixFileStoreAttributes attrs = new UnixFileStoreAttributes(); in get() local
39 UnixNativeDispatcher.statvfs(path, attrs); in get()
40 return attrs; in get()
DUnixFileStore.java118 UnixFileStoreAttributes attrs = readAttributes(); in getTotalSpace() local
119 return attrs.blockSize() * attrs.totalBlocks(); in getTotalSpace()
124 UnixFileStoreAttributes attrs = readAttributes(); in getUsableSpace() local
125 return attrs.blockSize() * attrs.availableBlocks(); in getUsableSpace()
130 UnixFileStoreAttributes attrs = readAttributes(); in getUnallocatedSpace() local
131 return attrs.blockSize() * attrs.freeBlocks(); in getUnallocatedSpace()
DUnixNativeDispatcher.java283 static void stat(UnixPath path, UnixFileAttributes attrs) throws UnixException { in stat() argument
286 stat0(buffer.address(), attrs); in stat() local
291 private static native void stat0(long pathAddress, UnixFileAttributes attrs) in stat0() argument
297 static void lstat(UnixPath path, UnixFileAttributes attrs) throws UnixException { in lstat() argument
300 lstat0(buffer.address(), attrs); in lstat() local
305 private static native void lstat0(long pathAddress, UnixFileAttributes attrs) in lstat0() argument
311 static native void fstat(int fd, UnixFileAttributes attrs) throws UnixException; in fstat() argument
316 static void fstatat(int dfd, byte[] path, int flag, UnixFileAttributes attrs) in fstatat() argument
321 fstatat0(dfd, buffer.address(), flag, attrs); in fstatat()
327 UnixFileAttributes attrs) throws UnixException; in fstatat0() argument
[all …]
DUnixFileSystemProvider.java168 FileAttribute<?>... attrs) in newFileChannel() argument
173 .toUnixMode(UnixFileModeAttribute.ALL_READWRITE, attrs); in newFileChannel()
186 … FileAttribute<?>... attrs) throws IOException in newAsynchronousFileChannel() argument
190 .toUnixMode(UnixFileModeAttribute.ALL_READWRITE, attrs); in newAsynchronousFileChannel()
205 FileAttribute<?>... attrs) in newByteChannel() argument
210 .toUnixMode(UnixFileModeAttribute.ALL_READWRITE, attrs); in newByteChannel()
225 UnixFileAttributes attrs = null; in implDelete() local
227 attrs = UnixFileAttributes.get(file, false); in implDelete()
228 if (attrs.isDirectory()) { in implDelete()
240 if (attrs != null && attrs.isDirectory() && in implDelete()
[all …]
DUnixSecureDirectoryStream.java150 FileAttribute<?>... attrs) in newByteChannel() argument
156 .toUnixMode(UnixFileModeAttribute.ALL_READWRITE, attrs); in newByteChannel()
201 UnixFileAttributes attrs = null; in implDelete() local
203 attrs = UnixFileAttributes.get(dfd, file, false); in implDelete()
207 flags = (attrs.isDirectory()) ? AT_REMOVEDIR : 0; in implDelete()
379 UnixFileAttributes attrs = (file == null) ? in readAttributes() local
384 return attrs.asBasicFileAttributes(); in readAttributes()
412 UnixFileAttributes attrs = UnixFileAttributes.get(fd); in setTimes() local
414 lastModifiedTime = attrs.lastModifiedTime(); in setTimes()
416 lastAccessTime = attrs.lastAccessTime(); in setTimes()
[all …]
DLinuxFileStore.java71 UnixFileAttributes attrs = null; in findMountEntry() local
73 attrs = UnixFileAttributes.get(parent, true); in findMountEntry()
77 if (attrs.dev() != dev()) in findMountEntry()
/libcore/ojluni/src/test/java/nio/file/attribute/
DBasicFileAttributeViewTest.java53 BasicFileAttributes attrs = Files.readAttributes(dir, BasicFileAttributes.class); in checkAttributesOfDirectory() local
54 check(attrs.isDirectory(), "is a directory"); in checkAttributesOfDirectory()
55 check(!attrs.isRegularFile(), "is not a regular file"); in checkAttributesOfDirectory()
56 check(!attrs.isSymbolicLink(), "is not a link"); in checkAttributesOfDirectory()
57 check(!attrs.isOther(), "is not other"); in checkAttributesOfDirectory()
61 check(f.lastModified()/1000 == attrs.lastModifiedTime().to(TimeUnit.SECONDS), in checkAttributesOfDirectory()
68 BasicFileAttributes attrs = Files.readAttributes(file, BasicFileAttributes.class); in checkAttributesOfFile() local
69 check(attrs.isRegularFile(), "is a regular file"); in checkAttributesOfFile()
70 check(!attrs.isDirectory(), "is not a directory"); in checkAttributesOfFile()
71 check(!attrs.isSymbolicLink(), "is not a link"); in checkAttributesOfFile()
[all …]
DPosixFileAttributeViewTest.java184 PosixFileAttributes attrs = in permissionTests() local
189 if (!attrs.isSymbolicLink()) { in permissionTests()
253 PosixFileAttributes attrs = view.readAttributes(); in ownerTests() local
256 view.setOwner(attrs.owner()); in ownerTests()
257 view.setGroup(attrs.group()); in ownerTests()
284 PosixFileAttributes attrs = Files.readAttributes(dir, PosixFileAttributes.class); in lookupPrincipalTests() local
287 System.out.format("lookup: %s\n", attrs.owner().getName()); in lookupPrincipalTests()
289 UserPrincipal owner = lookupService.lookupPrincipalByName(attrs.owner().getName()); in lookupPrincipalTests()
292 if (!owner.equals(attrs.owner())) in lookupPrincipalTests()
299 System.out.format("lookup group: %s\n", attrs.group().getName()); in lookupPrincipalTests()
[all …]
/libcore/ojluni/src/main/java/java/nio/file/
DTempFileHelper.java84 FileAttribute<?>[] attrs) in create() argument
97 if (attrs.length == 0) { in create()
99 attrs = new FileAttribute<?>[1]; in create()
100 attrs[0] = (createDirectory) ? PosixPermissions.dirPermissions : in create()
105 for (int i=0; i<attrs.length; i++) { in create()
106 if (attrs[i].name().equals("posix:permissions")) { in create()
112 FileAttribute<?>[] copy = new FileAttribute<?>[attrs.length+1]; in create()
113 System.arraycopy(attrs, 0, copy, 0, attrs.length); in create()
114 attrs = copy; in create()
115 attrs[attrs.length-1] = (createDirectory) ? in create()
[all …]
DFileTreeWalker.java130 private final BasicFileAttributes attrs; field in FileTreeWalker.Event
133 private Event(EventType type, Path file, BasicFileAttributes attrs, IOException ioe) { in Event() argument
136 this.attrs = attrs; in Event()
140 Event(EventType type, Path file, BasicFileAttributes attrs) { in Event() argument
141 this(type, file, attrs, null); in Event()
157 return attrs; in attributes()
217 BasicFileAttributes attrs; in getAttributes() local
219 attrs = Files.readAttributes(file, BasicFileAttributes.class, linkOptions); in getAttributes()
225 attrs = Files.readAttributes(file, in getAttributes()
229 return attrs; in getAttributes()
[all …]
DSimpleFileVisitor.java57 public FileVisitResult preVisitDirectory(T dir, BasicFileAttributes attrs) in preVisitDirectory() argument
61 Objects.requireNonNull(attrs); in preVisitDirectory()
72 public FileVisitResult visitFile(T file, BasicFileAttributes attrs) in visitFile() argument
76 Objects.requireNonNull(attrs); in visitFile()
DCopyMoveHelper.java109 BasicFileAttributes attrs = Files.readAttributes(source, in copyToForeignTarget() local
112 if (attrs.isSymbolicLink()) in copyToForeignTarget()
122 if (attrs.isDirectory()) { in copyToForeignTarget()
135 view.setTimes(attrs.lastModifiedTime(), in copyToForeignTarget()
136 attrs.lastAccessTime(), in copyToForeignTarget()
137 attrs.creationTime()); in copyToForeignTarget()
DFileVisitor.java119 FileVisitResult preVisitDirectory(T dir, BasicFileAttributes attrs) in preVisitDirectory() argument
135 FileVisitResult visitFile(T file, BasicFileAttributes attrs) in visitFile() argument
DFiles.java358 FileAttribute<?>... attrs)
361 return provider(path).newByteChannel(path, options, attrs);
627 public static Path createFile(Path path, FileAttribute<?>... attrs)
632 newByteChannel(path, options, attrs).close();
671 public static Path createDirectory(Path dir, FileAttribute<?>... attrs)
674 provider(dir).createDirectory(dir, attrs);
722 public static Path createDirectories(Path dir, FileAttribute<?>... attrs)
727 createAndCheckIsDirectory(dir, attrs);
767 createAndCheckIsDirectory(child, attrs);
777 FileAttribute<?>... attrs)
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/org/xml/sax/helpers/
DAttributeListImplTest.java64 AttributeListImpl attrs = new AttributeListImpl(); in testSetAttributeList() local
65 attrs.addAttribute("doe", "boolean", "false"); in testSetAttributeList()
67 attrs.setAttributeList(empty); in testSetAttributeList()
68 assertEquals(0, attrs.getLength()); in testSetAttributeList()
70 attrs.setAttributeList(multi); in testSetAttributeList()
71 assertEquals(multi.getLength(), attrs.getLength()); in testSetAttributeList()
74 assertEquals(multi.getName(i), attrs.getName(i)); in testSetAttributeList()
75 assertEquals(multi.getType(i), attrs.getType(i)); in testSetAttributeList()
76 assertEquals(multi.getValue(i), attrs.getValue(i)); in testSetAttributeList()
81 attrs.setAttributeList(null); in testSetAttributeList()
[all …]
DAttributesImplTest.java237 AttributesImpl attrs = new AttributesImpl(); in testSetAttributes() local
238 attrs.addAttribute("http://yet.another.uri", "doe", "john:doe", in testSetAttributes()
241 attrs.setAttributes(empty); in testSetAttributes()
242 assertEquals(0, attrs.getLength()); in testSetAttributes()
244 attrs.setAttributes(multi); in testSetAttributes()
245 assertEquals(multi.getLength(), attrs.getLength()); in testSetAttributes()
248 assertEquals(multi.getURI(i), attrs.getURI(i)); in testSetAttributes()
249 assertEquals(multi.getLocalName(i), attrs.getLocalName(i)); in testSetAttributes()
250 assertEquals(multi.getQName(i), attrs.getQName(i)); in testSetAttributes()
251 assertEquals(multi.getType(i), attrs.getType(i)); in testSetAttributes()
[all …]
/libcore/dom/src/test/java/org/w3c/domts/level1/core/
Dattrcreatedocumentfragment.java68 Attr attrs; in runTest() local
78 attrs = (Attr) domesticAttr.item(0); in runTest()
79 attrName = attrs.getName(); in runTest()
/libcore/ojluni/src/main/native/
DUnixNativeDispatcher.c445 static void prepAttributes(JNIEnv* env, struct stat64* buf, jobject attrs) { in prepAttributes() argument
446 (*env)->SetIntField(env, attrs, attrs_st_mode, (jint)buf->st_mode); in prepAttributes()
447 (*env)->SetLongField(env, attrs, attrs_st_ino, (jlong)buf->st_ino); in prepAttributes()
448 (*env)->SetLongField(env, attrs, attrs_st_dev, (jlong)buf->st_dev); in prepAttributes()
449 (*env)->SetLongField(env, attrs, attrs_st_rdev, (jlong)buf->st_rdev); in prepAttributes()
450 (*env)->SetIntField(env, attrs, attrs_st_nlink, (jint)buf->st_nlink); in prepAttributes()
451 (*env)->SetIntField(env, attrs, attrs_st_uid, (jint)buf->st_uid); in prepAttributes()
452 (*env)->SetIntField(env, attrs, attrs_st_gid, (jint)buf->st_gid); in prepAttributes()
453 (*env)->SetLongField(env, attrs, attrs_st_size, (jlong)buf->st_size); in prepAttributes()
454 (*env)->SetLongField(env, attrs, attrs_st_atime_sec, (jlong)buf->st_atime); in prepAttributes()
[all …]
/libcore/ojluni/src/main/java/java/nio/file/spi/
DFileSystemProvider.java473 FileAttribute<?>... attrs) in newFileChannel() argument
522 FileAttribute<?>... attrs) in newAsynchronousFileChannel() argument
566 Set<? extends OpenOption> options, FileAttribute<?>... attrs) throws IOException; in newByteChannel() argument
618 public abstract void createDirectory(Path dir, FileAttribute<?>... attrs) in createDirectory() argument
651 public void createSymbolicLink(Path link, Path target, FileAttribute<?>... attrs) in createSymbolicLink() argument

12