gitlab.com/evatix-go/core@v1.3.55/internal/internalinterface/internalpathextender/BasePathInfoer.go (about)

     1  package internalpathextender
     2  
     3  // PathInfoer
     4  //
     5  // FullPath:
     6  //  - Refers to the FullPath (dir or filename through absolute path).
     7  // FileName:
     8  //  - Refers to the file name at the end
     9  // DirName:
    10  //  - Refers to the file name at the end
    11  // Name:
    12  //  - Refers to the end of name could be file or dir.
    13  // Extension:
    14  //  - Refers to dot extension (.db, .back etc)
    15  // RootDir:
    16  //  - Refers to root dir where things started from.
    17  // Relative:
    18  //  - Refers to relative from RootDir
    19  // ParentDir:
    20  //  - Refers to parent dir of the FullPath and different from RootDir
    21  type PathInfoer interface {
    22  	FullPath() string
    23  	FileName() string
    24  	DirName() string
    25  	Name() string
    26  	// Extension
    27  	//
    28  	//  Refers to dot extension always
    29  	Extension() string
    30  	// RootDir
    31  	//
    32  	//  Refers to start of the dir
    33  	//  For example a repo start point
    34  	RootDir() string
    35  	// Relative
    36  	//
    37  	//  Refers to relative path from root
    38  	//  Joining Root + Relative should give absolute or FullPath()
    39  	Relative() string
    40  	// ParentDir
    41  	//
    42  	//  Refers to current full-path's parent dir.
    43  	//  ParentDir is different from RootDir.
    44  	ParentDir() string
    45  	// String
    46  	//
    47  	//  returns full summary info
    48  	String() string
    49  
    50  	Size() uint64
    51  }