equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
286 attrs = UnixFileAttributes.get(dir, true); |
286 attrs = UnixFileAttributes.get(dir, true); |
287 } catch (UnixException x) { |
287 } catch (UnixException x) { |
288 return x.asIOException(dir); |
288 return x.asIOException(dir); |
289 } |
289 } |
290 if (!attrs.isDirectory()) { |
290 if (!attrs.isDirectory()) { |
291 return new NotDirectoryException(dir.getPathForExecptionMessage()); |
291 return new NotDirectoryException(dir.getPathForExceptionMessage()); |
292 } |
292 } |
293 |
293 |
294 // return existing watch key after updating events if already |
294 // return existing watch key after updating events if already |
295 // registered |
295 // registered |
296 UnixFileKey fileKey = attrs.fileKey(); |
296 UnixFileKey fileKey = attrs.fileKey(); |