@Override public int umask(int mask) { return wlibc()._umask(mask); }
@Override public boolean isatty(FileDescriptor fd) { HANDLE handle = JavaLibCHelper.gethandle(fd); int type = wlibc().GetFileType(handle); return type == FILE_TYPE_CHAR; }
@Override public int isatty(int fd) { HANDLE handle = JavaLibCHelper.gethandle(fd); int type = wlibc().GetFileType(handle); return type == FILE_TYPE_CHAR ? 1 : 0; }
@Override public boolean isatty(FileDescriptor fd) { HANDLE handle = JavaLibCHelper.gethandle(fd); int type = wlibc().GetFileType(handle); return type == FILE_TYPE_CHAR; }
@Override public boolean isatty(FileDescriptor fd) { HANDLE handle = helper.gethandle(fd); int type = wlibc().GetFileType(handle); return type == FILE_TYPE_CHAR; }
@Override public boolean isatty(FileDescriptor fd) { HANDLE handle = JavaLibCHelper.gethandle(fd); int type = wlibc().GetFileType(handle); return type == FILE_TYPE_CHAR; }
@Override public int chdir(String path) { return wlibc()._wchdir(WString.path(path)); }
@Override public int unsetenv(String envName) { if (!wlibc().SetEnvironmentVariableW(new WString(envName), null)) { handler.error(EINVAL, "unsetenv", envName); return -1; } return 0; }
@Override public int unsetenv(String envName) { if (!wlibc().SetEnvironmentVariableW(new WString(envName), null)) { handler.error(EINVAL, "unsetenv", envName); return -1; } return 0; }
@Override public int unsetenv(String envName) { if (!wlibc().SetEnvironmentVariableW(new WString(envName), null)) { handler.error(EINVAL, "unsetenv", envName); return -1; } return 0; }
public int findFirstFile(String path, FileStat stat) { byte[] wpath = WString.path(path, true); WindowsFindData findData = new WindowsFindData(getRuntime()); HANDLE handle = wlibc().FindFirstFileW(wpath, findData); if (!handle.isValid()) return -1; wlibc().FindClose(handle); ((WindowsRawFileStat) stat).setup(path, findData); return 0; }
public int findFirstFile(String path, FileStat stat) { byte[] wpath = WString.path(path, true); WindowsFindData findData = new WindowsFindData(getRuntime()); HANDLE handle = wlibc().FindFirstFileW(wpath, findData); if (!handle.isValid()) return -1; wlibc().FindClose(handle); ((WindowsRawFileStat) stat).setup(path, findData); return 0; }
public int findFirstFile(String path, FileStat stat) { byte[] wpath = WString.path(path, true); WindowsFindData findData = new WindowsFindData(getRuntime()); HANDLE handle = wlibc().FindFirstFileW(wpath, findData); if (!handle.isValid()) return -1; wlibc().FindClose(handle); ((WindowsRawFileStat) stat).setup(path, findData); return 0; }
@Override public int fstat(FileDescriptor fileDescriptor, FileStat stat) { WindowsByHandleFileInformation info = new WindowsByHandleFileInformation(getRuntime()); if (wlibc().GetFileInformationByHandle(JavaLibCHelper.gethandle(fileDescriptor), info) == 0) return -1; ((WindowsRawFileStat) stat).setup(info); return 0; }
@Override public int fstat(FileDescriptor fileDescriptor, FileStat stat) { WindowsByHandleFileInformation info = new WindowsByHandleFileInformation(getRuntime()); if (wlibc().GetFileInformationByHandle(JavaLibCHelper.gethandle(fileDescriptor), info) == 0) return -1; ((WindowsRawFileStat) stat).setup(info); return 0; }
@Override public int link(String oldpath, String newpath) { boolean linkCreated = wlibc().CreateHardLinkW(WString.path(newpath), WString.path(oldpath), null); if (!linkCreated) { int error = errno(); handler.error(mapErrorToErrno(error), "link", oldpath + " or " + newpath); return error; } else { return 0; } }
@Override public int link(String oldpath, String newpath) { boolean linkCreated = wlibc().CreateHardLinkW(WString.path(newpath), WString.path(oldpath), null); if (!linkCreated) { int error = errno(); handler.error(mapErrorToErrno(error), "link", oldpath + " or " + newpath); return error; } else { return 0; } }
@Override public int link(String oldpath, String newpath) { boolean linkCreated = wlibc().CreateHardLinkW(WString.path(newpath), WString.path(oldpath), null); if (!linkCreated) { int error = errno(); handler.error(mapErrorToErrno(error), "link", oldpath + " or " + newpath); return error; } else { return 0; } }