gitlab.com/evatix-go/core@v1.3.55/chmodhelper/consts.go (about)

     1  package chmodhelper
     2  
     3  import (
     4  	"os"
     5  
     6  	"gitlab.com/evatix-go/core/constants"
     7  )
     8  
     9  // Reference : https://ss64.com/bash/chmod.html
    10  const (
    11  	SingleRwxLengthString                           = "3"
    12  	HyphenedRwxLength                               = constants.ArbitraryCapacity10
    13  	HyphenedRwxLengthString                         = constants.N10String
    14  	FullRwxLengthWithoutHyphenString                = constants.N9String
    15  	FullRwxLengthWithoutHyphen                      = constants.ArbitraryCapacity9
    16  	SingleRwxLength                                 = 3
    17  	ReadValue                                       = 4
    18  	WriteValue                                      = 2
    19  	ExecuteValue                                    = 1
    20  	ReadWriteValue                                  = ReadValue + WriteValue
    21  	ReadExecuteValue                                = ReadValue + ExecuteValue
    22  	WriteExecuteValue                               = WriteValue + ExecuteValue
    23  	ReadWriteExecuteValue                           = ReadValue + WriteValue + ExecuteValue
    24  	OwnerIndex                                      = 0
    25  	GroupIndex                                      = 1
    26  	OtherIndex                                      = 2
    27  	ReadChar                            byte        = 'r'
    28  	NopChar                             byte        = '-'
    29  	WriteChar                           byte        = 'w'
    30  	ExecuteChar                         byte        = 'x'
    31  	AllWildcards                                    = "***"
    32  	pathInvalidMessage                              = "Path invalid or permission issue. path : "
    33  	chmodExpectationFailed                          = "chmod expectation failed"
    34  	messageWithPathWrappedFormat                    = "%s Path: (\"%s\")"     // message, path
    35  	fileDefaultChmod                    os.FileMode = 0644                    // cannot execute by everyone OwnerCanReadWriteGroupOtherCanReadOnly
    36  	dirDefaultChmod                     os.FileMode = 0755                    // can execute by everyone OwnerCanDoAllExecuteGroupOtherCanReadExecute
    37  	fileModeStringFriendlyDisplayFormat             = "{chmod : \"%s (%s)\"}" // chmod - 0777, -rwxrwxrwx
    38  )