1. /*
  2. * Copyright 2001,2004 The Apache Software Foundation
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. *
  16. */
  17. package org.apache.tools.zip;
  18. /**
  19. * Constants from stat.h on Unix systems.
  20. *
  21. * @version $Revision: 1.5.2.4 $
  22. */
  23. public interface UnixStat {
  24. /**
  25. * Bits used for permissions (and sticky bit)
  26. *
  27. * @since 1.1
  28. */
  29. int PERM_MASK = 07777;
  30. /**
  31. * Indicates symbolic links.
  32. *
  33. * @since 1.1
  34. */
  35. int LINK_FLAG = 0120000;
  36. /**
  37. * Indicates plain files.
  38. *
  39. * @since 1.1
  40. */
  41. int FILE_FLAG = 0100000;
  42. /**
  43. * Indicates directories.
  44. *
  45. * @since 1.1
  46. */
  47. int DIR_FLAG = 040000;
  48. // ----------------------------------------------------------
  49. // somewhat arbitrary choices that are quite common for shared
  50. // installations
  51. // -----------------------------------------------------------
  52. /**
  53. * Default permissions for symbolic links.
  54. *
  55. * @since 1.1
  56. */
  57. int DEFAULT_LINK_PERM = 0777;
  58. /**
  59. * Default permissions for directories.
  60. *
  61. * @since 1.1
  62. */
  63. int DEFAULT_DIR_PERM = 0755;
  64. /**
  65. * Default permissions for plain files.
  66. *
  67. * @since 1.1
  68. */
  69. int DEFAULT_FILE_PERM = 0644;
  70. }