Lines Matching refs:file

8  * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
14 * version 2 for more details (a copy is included in the LICENSE file that
28 import java.nio.file.*;
29 import java.nio.file.attribute.*;
58 return "file";
105 WindowsPath file = (WindowsPath)path;
110 .newFileChannel(file.getPathForWin32Calls(),
111 file.getPathForPermissionCheck(),
115 x.rethrowAsIOException(file);
134 WindowsPath file = (WindowsPath)path;
140 .newAsynchronousFileChannel(file.getPathForWin32Calls(),
141 file.getPathForPermissionCheck(),
146 x.rethrowAsIOException(file);
159 WindowsPath file = WindowsPath.toWindowsPath(obj);
164 return (V) WindowsFileAttributeViews.createBasicView(file, followLinks);
166 return (V) WindowsFileAttributeViews.createDosView(file, followLinks);
168 return (V) new WindowsAclFileAttributeView(file, followLinks);
171 new WindowsAclFileAttributeView(file, followLinks));
173 return (V) new WindowsUserDefinedFileAttributeView(file, followLinks);
179 public <A extends BasicFileAttributes> A readAttributes(Path file,
193 return (A) getFileAttributeView(file, view, options).readAttributes();
198 WindowsPath file = WindowsPath.toWindowsPath(obj);
201 return WindowsFileAttributeViews.createBasicView(file, followLinks);
203 return WindowsFileAttributeViews.createDosView(file, followLinks);
205 return new WindowsAclFileAttributeView(file, followLinks);
208 new WindowsAclFileAttributeView(file, followLinks));
210 return new WindowsUserDefinedFileAttributeView(file, followLinks);
220 WindowsPath file = WindowsPath.toWindowsPath(obj);
225 .newFileChannel(file.getPathForWin32Calls(),
226 file.getPathForPermissionCheck(),
230 x.rethrowAsIOException(file);
239 WindowsPath file = WindowsPath.toWindowsPath(obj);
240 file.checkDelete();
244 // need to know if file is a directory or junction
245 attrs = WindowsFileAttributes.get(file, false);
247 RemoveDirectory(file.getPathForWin32Calls());
249 DeleteFile(file.getPathForWin32Calls());
254 // no-op if file does not exist
266 file.getPathForExceptionMessage());
269 x.rethrowAsIOException(file);
293 * Checks the file security against desired access.
295 private static boolean hasDesiredAccess(WindowsPath file, int rights) throws IOException {
298 String target = WindowsLinkSupport.getFinalPath(file, true);
311 exc.rethrowAsIOException(file);
319 * Checks if the given file(or directory) exists and is readable.
321 private void checkReadAccess(WindowsPath file) throws IOException {
325 .newFileChannel(file.getPathForWin32Calls(),
326 file.getPathForPermissionCheck(),
331 // Windows errors are very inconsistent when the file is a directory
335 new WindowsDirectoryStream(file, null).close();
338 exc.rethrowAsIOException(file);
345 WindowsPath file = WindowsPath.toWindowsPath(obj);
360 // access to file; default if modes not specified
362 checkReadAccess(file);
368 file.checkRead();
372 file.checkWrite();
378 sm.checkExec(file.getPathForPermissionCheck());
382 if (!hasDesiredAccess(file, mask))
384 file.getPathForExceptionMessage(), null,
391 WindowsFileAttributes attrs = WindowsFileAttributes.get(file, true);
394 file.getPathForExceptionMessage(), null,
397 exc.rethrowAsIOException(file);
400 if (WindowsFileStore.create(file).isReadOnly()) {
402 file.getPathForExceptionMessage(), null, "Read-only file system");
460 WindowsPath file = WindowsPath.toWindowsPath(obj);
461 file.checkRead();
464 attrs = WindowsFileAttributes.get(file, true);
466 x.rethrowAsIOException(file);
476 WindowsPath file = WindowsPath.toWindowsPath(obj);
480 file.checkRead();
482 return WindowsFileStore.create(file);
528 throw new UnsupportedOperationException("Initial file attributes" +
549 * does to other file types. For that reason we need to check if the