Home | History | Annotate | Download | only in sftp
      1 /*
      2  * Copyright (c) 2006-2011 Christian Plattner. All rights reserved.
      3  * Please refer to the LICENSE.txt for licensing details.
      4  */
      5 package ch.ethz.ssh2.sftp;
      6 
      7 /**
      8  *
      9  * Attribute Flags. The 'valid-attribute-flags' field in
     10  * the SFTP ATTRS data type specifies which of the fields are actually present.
     11  *
     12  * @author Christian Plattner
     13  * @version 2.50, 03/15/10
     14  *
     15  */
     16 public class AttribFlags
     17 {
     18 	/**
     19 	 * Indicates that the 'allocation-size' field is present.
     20 	 */
     21 	public static final int SSH_FILEXFER_ATTR_SIZE = 0x00000001;
     22 
     23 	/** Protocol version 6:
     24 	 * 0x00000002 was used in a previous version of this protocol.
     25 	 * It is now a reserved value and MUST NOT appear in the mask.
     26 	 * Some future version of this protocol may reuse this value.
     27 	 */
     28 	public static final int SSH_FILEXFER_ATTR_V3_UIDGID = 0x00000002;
     29 
     30 	/**
     31 	 * Indicates that the 'permissions' field is present.
     32 	 */
     33 	public static final int SSH_FILEXFER_ATTR_PERMISSIONS = 0x00000004;
     34 
     35 	/**
     36 	 * Indicates that the 'atime' and 'mtime' field are present
     37 	 * (protocol v3).
     38 	 */
     39 	public static final int SSH_FILEXFER_ATTR_V3_ACMODTIME = 0x00000008;
     40 
     41 	/**
     42 	 * Indicates that the 'atime' field is present.
     43 	 */
     44 	public static final int SSH_FILEXFER_ATTR_ACCESSTIME = 0x00000008;
     45 
     46 	/**
     47 	 * Indicates that the 'createtime' field is present.
     48 	 */
     49 	public static final int SSH_FILEXFER_ATTR_CREATETIME = 0x00000010;
     50 
     51 	/**
     52 	 * Indicates that the 'mtime' field is present.
     53 	 */
     54 	public static final int SSH_FILEXFER_ATTR_MODIFYTIME = 0x00000020;
     55 
     56 	/**
     57 	 * Indicates that the 'acl' field is present.
     58 	 */
     59 	public static final int SSH_FILEXFER_ATTR_ACL = 0x00000040;
     60 
     61 	/**
     62 	 * Indicates that the 'owner' and 'group' fields are present.
     63 	 */
     64 	public static final int SSH_FILEXFER_ATTR_OWNERGROUP = 0x00000080;
     65 
     66 	/**
     67 	 * Indicates that additionally to the 'atime', 'createtime',
     68 	 * 'mtime' and 'ctime' fields (if present), there is also
     69 	 * 'atime-nseconds', 'createtime-nseconds',  'mtime-nseconds'
     70 	 * and 'ctime-nseconds'.
     71 	 */
     72 	public static final int SSH_FILEXFER_ATTR_SUBSECOND_TIMES = 0x00000100;
     73 
     74 	/**
     75 	 * Indicates that the 'attrib-bits' and 'attrib-bits-valid'
     76 	 * fields are present.
     77 	 */
     78 	public static final int SSH_FILEXFER_ATTR_BITS = 0x00000200;
     79 
     80 	/**
     81 	 * Indicates that the 'allocation-size' field is present.
     82 	 */
     83 	public static final int SSH_FILEXFER_ATTR_ALLOCATION_SIZE = 0x00000400;
     84 
     85 	/**
     86 	 * Indicates that the 'text-hint' field is present.
     87 	 */
     88 	public static final int SSH_FILEXFER_ATTR_TEXT_HINT = 0x00000800;
     89 
     90 	/**
     91 	 * Indicates that the 'mime-type' field is present.
     92 	 */
     93 	public static final int SSH_FILEXFER_ATTR_MIME_TYPE = 0x00001000;
     94 
     95 	/**
     96 	 * Indicates that the 'link-count' field is present.
     97 	 */
     98 	public static final int SSH_FILEXFER_ATTR_LINK_COUNT = 0x00002000;
     99 
    100 	/**
    101 	 * Indicates that the 'untranslated-name' field is present.
    102 	 */
    103 	public static final int SSH_FILEXFER_ATTR_UNTRANSLATED_NAME = 0x00004000;
    104 
    105 	/**
    106 	 * Indicates that the 'ctime' field is present.
    107 	 */
    108 	public static final int SSH_FILEXFER_ATTR_CTIME = 0x00008000;
    109 
    110 	/**
    111 	 * Indicates that the 'extended-count' field (and probablby some
    112 	 * 'extensions') is present.
    113 	 */
    114 	public static final int SSH_FILEXFER_ATTR_EXTENDED = 0x80000000;
    115 }
    116