@Override public int stat(String path, FileStat stat) { WindowsFileInformation info = new WindowsFileInformation(getRuntime()); byte[] wpath = WString.path(path, true); if (wlibc().GetFileAttributesExW(wpath, 0, info) != 0) { ((WindowsRawFileStat) stat).setup(path, info); } else { int e = errno(); if (e == ERROR_FILE_NOT_FOUND.intValue() || e == ERROR_PATH_NOT_FOUND.intValue() || e == ERROR_BAD_NETPATH.intValue()) { return -1; } return findFirstFile(path, stat); } return 0; }
@Override public int stat(String path, FileStat stat) { WindowsFileInformation info = new WindowsFileInformation(getRuntime()); byte[] wpath = WString.path(path, true); if (wlibc().GetFileAttributesExW(wpath, 0, info) != 0) { ((WindowsRawFileStat) stat).setup(path, info); } else { int e = errno(); if (e == ERROR_FILE_NOT_FOUND.intValue() || e == ERROR_PATH_NOT_FOUND.intValue() || e == ERROR_BAD_NETPATH.intValue()) { return -1; } return findFirstFile(path, stat); } return 0; }
@Override public int stat(String path, FileStat stat) { WindowsFileInformation info = new WindowsFileInformation(getRuntime()); byte[] wpath = WString.path(path, true); if (wlibc().GetFileAttributesExW(wpath, 0, info) != 0) { ((WindowsRawFileStat) stat).setup(path, info); } else { int e = errno(); if (e == ERROR_FILE_NOT_FOUND.intValue() || e == ERROR_PATH_NOT_FOUND.intValue() || e == ERROR_BAD_NETPATH.intValue()) { return -1; } return findFirstFile(path, stat); } return 0; }