Documentation ¶
Index ¶
Constants ¶
View Source
const ( ID_LENGTH = 32 IV_LENGTH = 12 // Standard EMPTY_ID = Id("") ROOT_ID = EMPTY_ID ROOT_NAME = "" )
View Source
const (
FILE_SEPARATOR = "/"
)
Variables ¶
This section is empty.
Functions ¶
func BuildDirs ¶
Take in the FULL fat and create a mapping of directories to their children. This is not a tree, just a straight up map. Only directories will be keys and every directory will be represented.
func RemoveChild ¶
Types ¶
type Dirent ¶
type Dirent struct { Id Id IsFile bool IV []byte Owner identity.UserId Group identity.GroupId Name string CreateTimestamp int64 ModTimestamp int64 AccessTimestamp int64 AccessCount uint Permissions Permissions Size uint64 // bytes Md5 string Parent Id }
Anything that can be in a directory.
func (*Dirent) CanExecute ¶
Can the specified user execute the dirent.
type Permissions ¶
type Permissions uint32
const ( PERM_SU Permissions = 1 << (12 - iota) // Set UID PERM_SG // Set GID PERM_ST // Sticky PERM_UR PERM_UW PERM_UX PERM_GR PERM_GW PERM_GX PERM_OR PERM_OW PERM_OX EMPTY_PERMISSIONS Permissions = 0 // 0660 DEFAULT_FILE_PERMISSIONS Permissions = EMPTY_PERMISSIONS | PERM_UR | PERM_UW | PERM_GR | PERM_GR // 0770 DEFAULT_DIR_PERMISSIONS Permissions = DEFAULT_FILE_PERMISSIONS | PERM_UX | PERM_GX )
func PermissionsFromFileMode ¶
func PermissionsFromFileMode(mode os.FileMode) Permissions
func PermissionsFromString ¶
func PermissionsFromString(rawPerms string) (Permissions, error)
Convert a string of the style: 775 in permissions. Takes four or three digit strings.
func (Permissions) Has ¶
func (this Permissions) Has(permissions Permissions) bool
Check if this permissions contains some permissions.
func (Permissions) String ¶
func (this Permissions) String() string
Click to show internal directories.
Click to hide internal directories.