/MATE-20_EMUI_11.0.0/src/main/java/ohos/system/OsHelperConstants.java

https://github.com/dstmath/HWFramework · Java · 91 lines · 86 code · 5 blank · 0 comment · 2 complexity · 553b8166383e173959d6e705e5a2740a MD5 · raw file

  1. package ohos.system;
  2. import android.system.OsConstants;
  3. public final class OsHelperConstants {
  4. public static final int AF_INET = OsConstants.AF_INET;
  5. public static final int AF_INET6 = OsConstants.AF_INET6;
  6. public static final int AF_NETLINK = OsConstants.AF_NETLINK;
  7. public static final int AF_PACKET = OsConstants.AF_PACKET;
  8. public static final int AF_UNIX = OsConstants.AF_UNIX;
  9. public static final int EEXIST = OsConstants.EEXIST;
  10. public static final int ENOENT = OsConstants.ENOENT;
  11. public static final int ENOSPC = OsConstants.ENOSPC;
  12. public static final int EXDEV = OsConstants.EXDEV;
  13. public static final int F_DUPFD = OsConstants.F_DUPFD;
  14. public static final int F_DUPFD_CLOEXEC = OsConstants.F_DUPFD_CLOEXEC;
  15. public static final int F_GETFD = OsConstants.F_GETFD;
  16. public static final int F_GETFL = OsConstants.F_GETFL;
  17. public static final int F_GETLK = OsConstants.F_GETLK;
  18. public static final int F_GETLK64 = OsConstants.F_GETLK64;
  19. public static final int F_GETOWN = OsConstants.F_GETOWN;
  20. public static final int F_OK = OsConstants.F_OK;
  21. public static final int F_RDLCK = OsConstants.F_RDLCK;
  22. public static final int F_SETFD = OsConstants.F_SETFD;
  23. public static final int F_SETFL = OsConstants.F_SETFL;
  24. public static final int F_SETLK = OsConstants.F_SETLK;
  25. public static final int F_SETLK64 = OsConstants.F_SETLK64;
  26. public static final int F_SETLKW = OsConstants.F_SETLKW;
  27. public static final int F_SETLKW64 = OsConstants.F_SETLKW64;
  28. public static final int F_SETOWN = OsConstants.F_SETOWN;
  29. public static final int F_UNLCK = OsConstants.F_UNLCK;
  30. public static final int F_WRLCK = OsConstants.F_WRLCK;
  31. public static final int O_APPEND = OsConstants.O_APPEND;
  32. public static final int O_CLOEXEC = OsConstants.O_CLOEXEC;
  33. public static final int O_CREAT = OsConstants.O_CREAT;
  34. public static final int O_DIRECT = OsConstants.O_DIRECT;
  35. public static final int O_DSYNC = OsConstants.O_DSYNC;
  36. public static final int O_EXCL = OsConstants.O_EXCL;
  37. public static final int O_NOCTTY = OsConstants.O_NOCTTY;
  38. public static final int O_NOFOLLOW = OsConstants.O_NOFOLLOW;
  39. public static final int O_NONBLOCK = OsConstants.O_NONBLOCK;
  40. public static final int O_RDONLY = OsConstants.O_RDONLY;
  41. public static final int O_RDWR = OsConstants.O_RDWR;
  42. public static final int O_SYNC = OsConstants.O_SYNC;
  43. public static final int O_TRUNC = OsConstants.O_TRUNC;
  44. public static final int O_WRONLY = OsConstants.O_WRONLY;
  45. public static final int PR_SET_DUMPABLE = OsConstants.PR_SET_DUMPABLE;
  46. public static final int R_OK = OsConstants.R_OK;
  47. public static final int SEEK_CUR = OsConstants.SEEK_CUR;
  48. public static final int SEEK_END = OsConstants.SEEK_END;
  49. public static final int SEEK_SET = OsConstants.SEEK_SET;
  50. public static final int SOCK_CLOEXEC = OsConstants.SOCK_CLOEXEC;
  51. public static final int SOCK_DGRAM = OsConstants.SOCK_DGRAM;
  52. public static final int SOCK_NONBLOCK = OsConstants.SOCK_NONBLOCK;
  53. public static final int SOCK_RAW = OsConstants.SOCK_RAW;
  54. public static final int SOCK_SEQPACKET = OsConstants.SOCK_SEQPACKET;
  55. public static final int SOCK_STREAM = OsConstants.SOCK_STREAM;
  56. public static final int SOL_SOCKET = OsConstants.SOL_SOCKET;
  57. public static final int SO_SNDTIMEO = OsConstants.SO_SNDTIMEO;
  58. public static final int S_IFDIR = OsConstants.S_IFDIR;
  59. public static final int S_IFMT = OsConstants.S_IFMT;
  60. public static final int S_IFREG = OsConstants.S_IFREG;
  61. public static final int S_IRGRP = OsConstants.S_IRGRP;
  62. public static final int S_IROTH = OsConstants.S_IROTH;
  63. public static final int S_IRUSR = OsConstants.S_IRUSR;
  64. public static final int S_IRWXG = OsConstants.S_IRWXG;
  65. public static final int S_IRWXO = OsConstants.S_IRWXO;
  66. public static final int S_IRWXU = OsConstants.S_IRWXU;
  67. public static final int S_ISUID = OsConstants.S_ISUID;
  68. public static final int S_ISVTX = OsConstants.S_ISVTX;
  69. public static final int S_IWGRP = OsConstants.S_IWGRP;
  70. public static final int S_IWOTH = OsConstants.S_IWOTH;
  71. public static final int S_IWUSR = OsConstants.S_IWUSR;
  72. public static final int S_IXGRP = OsConstants.S_IXGRP;
  73. public static final int S_IXOTH = OsConstants.S_IXOTH;
  74. public static final int S_IXUSR = OsConstants.S_IXUSR;
  75. public static final int W_OK = OsConstants.W_OK;
  76. public static final int X_OK = OsConstants.X_OK;
  77. public static final int _SC_CLK_TCK = OsConstants._SC_CLK_TCK;
  78. private OsHelperConstants() {
  79. }
  80. public static boolean isRegularFile(int i) {
  81. return (i & S_IFMT) == S_IFREG;
  82. }
  83. public static boolean isDir(int i) {
  84. return (i & S_IFMT) == S_IFDIR;
  85. }
  86. }