fs

package
v0.5.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2021 License: BSD-3-Clause Imports: 14 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddChildToResc added in v0.4.4

func AddChildToResc(conn *connection.IRODSConnection, parent, child, options string) error

AddChildToResc adds a child to a parent resource

func AddCollectionMeta added in v0.2.0

func AddCollectionMeta(conn *connection.IRODSConnection, path string, metadata *types.IRODSMeta) error

AddCollectionMeta sets metadata of a data object for the path to the given key values. metadata.AVUID is ignored

func AddDataObjectMeta added in v0.2.0

func AddDataObjectMeta(conn *connection.IRODSConnection, path string, metadata *types.IRODSMeta) error

AddDataObjectMeta sets metadata of a data object for the path to the given key values. metadata.AVUID is ignored

func AddGroup added in v0.4.5

func AddGroup(conn *connection.IRODSConnection, group string) error

AddGroup adds a group.

func AddResourceMeta added in v0.4.0

func AddResourceMeta(conn *connection.IRODSConnection, name string, metadata *types.IRODSMeta) error

AddResourceMeta sets metadata of a resource to the given key values. metadata.AVUID is ignored

func AddToGroup added in v0.4.5

func AddToGroup(conn *connection.IRODSConnection, group, user string) error

AddToGroup adds a user to a group.

func AddUser added in v0.4.4

func AddUser(conn *connection.IRODSConnection, username, password string) error

AddUser adds a user.

func AddUserMeta added in v0.4.5

func AddUserMeta(conn *connection.IRODSConnection, user string, metadata *types.IRODSMeta) error

AddUserMeta sets metadata of a user object to given key values.

func ChangeAccessControlCollection added in v0.4.5

func ChangeAccessControlCollection(conn *connection.IRODSConnection, path string, access types.IRODSAccessLevelType, userName, zoneName string, recursive, adminFlag bool) error

ChangeAccessControlCollection changes access control on a data object.

func ChangeAccessControlDataObject added in v0.4.5

func ChangeAccessControlDataObject(conn *connection.IRODSConnection, path string, access types.IRODSAccessLevelType, userName, zoneName string, adminFlag bool) error

ChangeAccessControlDataObject changes access control on a data object.

func ChangeUserType added in v0.4.5

func ChangeUserType(conn *connection.IRODSConnection, user, newType string) error

ChangeUserType changes the type / role of a user object

func CloseDataObject

func CloseDataObject(conn *connection.IRODSConnection, handle *types.IRODSFileHandle) error

CloseDataObject closes a file handle of a data object

func CloseDataObjectReplica added in v0.5.2

func CloseDataObjectReplica(conn *connection.IRODSConnection, handle *types.IRODSFileHandle) error

CloseDataObjectReplica closes a file handle of a data object replica, only used by parallel upload

func CopyDataObject

func CopyDataObject(conn *connection.IRODSConnection, srcPath string, destPath string) error

CopyDataObject creates a copy of a data object for the path

func CreateCollection

func CreateCollection(conn *connection.IRODSConnection, path string, recurse bool) error

CreateCollection creates a collection for the path

func CreateDataObject

func CreateDataObject(conn *connection.IRODSConnection, path string, resource string, force bool) (*types.IRODSFileHandle, error)

CreateDataObject creates a data object for the path, returns a file handle

func DeleteCollection

func DeleteCollection(conn *connection.IRODSConnection, path string, recurse bool, force bool) error

DeleteCollection deletes a collection for the path

func DeleteCollectionMeta added in v0.2.0

func DeleteCollectionMeta(conn *connection.IRODSConnection, path string, metadata *types.IRODSMeta) error

DeleteCollectionMeta sets metadata of a data object for the path to the given key values. The metadata AVU is selected on basis of AVUID if it is supplied, otherwise on basis of Name, Value and Units.

func DeleteDataObject

func DeleteDataObject(conn *connection.IRODSConnection, path string, force bool) error

DeleteDataObject deletes a data object for the path

func DeleteDataObjectMeta added in v0.2.0

func DeleteDataObjectMeta(conn *connection.IRODSConnection, path string, metadata *types.IRODSMeta) error

DeleteDataObjectMeta sets metadata of a data object for the path to the given key values. The metadata AVU is selected on basis of AVUID if it is supplied, otherwise on basis of Name, Value and Units.

func DeleteResourceMeta added in v0.4.0

func DeleteResourceMeta(conn *connection.IRODSConnection, name string, metadata *types.IRODSMeta) error

DeleteResourceMeta sets metadata of a resource to the given key values. The metadata AVU is selected on basis of AVUID if it is supplied, otherwise on basis of Name, Value and Units.

func DeleteUserMeta added in v0.4.5

func DeleteUserMeta(conn *connection.IRODSConnection, user string, metadata *types.IRODSMeta) error

DeleteUserMeta removes the metadata of a user object. The metadata AVU is selected on basis of AVUID if it is supplied, otherwise on basis of Name, Value and Units.

func DownloadDataObject

func DownloadDataObject(session *session.IRODSSession, irodsPath string, resource string, localPath string) error

DownloadDataObject downloads a data object at the iRODS path to the local path

func DownloadDataObjectParallel added in v0.5.2

func DownloadDataObjectParallel(session *session.IRODSSession, irodsPath string, resource string, localPath string, dataObjectLength int64, taskNum int) error

DownloadDataObjectParallel downloads a data object at the iRODS path to the local path in parallel Partitions a file into n (taskNum) tasks and downloads in parallel

func DownloadDataObjectParallelInBlocksAsync added in v0.5.2

func DownloadDataObjectParallelInBlocksAsync(session *session.IRODSSession, irodsPath string, resource string, localPath string, dataObjectLength int64, blockLength int64, taskNum int) (chan int64, chan error)

DownloadDataObjectParallelInBlocksAsync downloads a data object at the iRODS path to the local path in parallel Chunks a file into fixed-size blocks and transfers them using n (taskNum) tasks in parallel

func GetCollection

func GetCollection(conn *connection.IRODSConnection, path string) (*types.IRODSCollection, error)

GetCollection returns a collection for the path

func GetDataObject

func GetDataObject(conn *connection.IRODSConnection, collection *types.IRODSCollection, filename string) (*types.IRODSDataObject, error)

GetDataObject returns a data object for the path

func GetDataObjectMasterReplica

func GetDataObjectMasterReplica(conn *connection.IRODSConnection, collection *types.IRODSCollection, filename string) (*types.IRODSDataObject, error)

GetDataObjectMasterReplica returns a data object for the path, returns only master replica

func GetGroup added in v0.3.0

func GetGroup(conn *connection.IRODSConnection, group string) (*types.IRODSUser, error)

GetGroup returns the group

func GetReplicaAccessInfo added in v0.5.2

func GetReplicaAccessInfo(conn *connection.IRODSConnection, handle *types.IRODSFileHandle) (string, string, error)

GetReplicaAccessInfo returns replica token and resource hierarchy

func GetResource added in v0.4.0

func GetResource(conn *connection.IRODSConnection, name string) (*types.IRODSResource, error)

GetResource returns a resource for the name

func GetUserGlobalQuota added in v0.5.1

func GetUserGlobalQuota(conn *connection.IRODSConnection, user string) (*types.IRODSQuota, error)

GetUserGlobalQuota returns the global quota of a user or group

func ListCollectionAccess added in v0.3.0

func ListCollectionAccess(conn *connection.IRODSConnection, path string) ([]*types.IRODSAccess, error)

ListCollectionAccess returns collection accesses for the path

func ListCollectionMeta added in v0.3.0

func ListCollectionMeta(conn *connection.IRODSConnection, path string) ([]*types.IRODSMeta, error)

ListCollectionMeta returns a colleciton metadata for the path

func ListDataObjectAccess added in v0.3.0

func ListDataObjectAccess(conn *connection.IRODSConnection, collection *types.IRODSCollection, filename string) ([]*types.IRODSAccess, error)

ListDataObjectAccess returns data object accesses for the path

func ListDataObjectMeta added in v0.3.0

func ListDataObjectMeta(conn *connection.IRODSConnection, collection *types.IRODSCollection, filename string) ([]*types.IRODSMeta, error)

ListDataObjectMeta returns a data object metadata for the path

func ListDataObjects

func ListDataObjects(conn *connection.IRODSConnection, collection *types.IRODSCollection) ([]*types.IRODSDataObject, error)

ListDataObjects lists data objects in the given collection

func ListDataObjectsMasterReplica

func ListDataObjectsMasterReplica(conn *connection.IRODSConnection, collection *types.IRODSCollection) ([]*types.IRODSDataObject, error)

ListDataObjectsMasterReplica lists data objects in the given collection, returns only master replica

func ListGroupUsers added in v0.3.0

func ListGroupUsers(conn *connection.IRODSConnection, group string) ([]*types.IRODSUser, error)

ListGroupUsers returns users in the group

func ListGroups added in v0.4.5

func ListGroups(conn *connection.IRODSConnection) ([]*types.IRODSUser, error)

ListGroups returns all groups

func ListSubCollections

func ListSubCollections(conn *connection.IRODSConnection, path string) ([]*types.IRODSCollection, error)

ListSubCollections lists subcollections in the given collection

func ListUserGroupNames added in v0.4.5

func ListUserGroupNames(conn *connection.IRODSConnection, user string) ([]string, error)

ListUserGroupNames lists the group names a user is a member of

func ListUserMeta added in v0.4.5

func ListUserMeta(conn *connection.IRODSConnection, user string) ([]*types.IRODSMeta, error)

ListUserMeta returns a user metadata for the path

func ListUserResourceQuota added in v0.4.5

func ListUserResourceQuota(conn *connection.IRODSConnection, user string) ([]*types.IRODSQuota, error)

ListUserResourceQuota lists all existing resource quota of a user or group

func ListUsers added in v0.4.5

func ListUsers(conn *connection.IRODSConnection) ([]*types.IRODSUser, error)

ListUsers lists all users

func MoveCollection

func MoveCollection(conn *connection.IRODSConnection, srcPath string, destPath string) error

MoveCollection moves a collection for the path to another path

func MoveDataObject

func MoveDataObject(conn *connection.IRODSConnection, srcPath string, destPath string) error

MoveDataObject moves a data object for the path to another path

func OpenDataObject

func OpenDataObject(conn *connection.IRODSConnection, path string, resource string, mode string) (*types.IRODSFileHandle, int64, error)

OpenDataObject opens a data object for the path, returns a file handle

func OpenDataObjectWithOperation

func OpenDataObjectWithOperation(conn *connection.IRODSConnection, path string, resource string, mode string, oper common.OperationType) (*types.IRODSFileHandle, error)

OpenDataObjectWithOperation opens a data object for the path, returns a file handle

func OpenDataObjectWithReplicaToken added in v0.5.2

func OpenDataObjectWithReplicaToken(conn *connection.IRODSConnection, path string, resource string, mode string, replicaToken string, resourceHierarchy string) (*types.IRODSFileHandle, int64, error)

OpenDataObjectWithReplicaToken opens a data object for the path, returns a file handle

func ReadDataObject

func ReadDataObject(conn *connection.IRODSConnection, handle *types.IRODSFileHandle, length int) ([]byte, error)

ReadDataObject reads data from a data object

func ReplicateDataObject

func ReplicateDataObject(conn *connection.IRODSConnection, path string, resource string, update bool, adminFlag bool) error

ReplicateDataObject replicates a data object for the path to the given reousrce

func RmFromGroup added in v0.4.5

func RmFromGroup(conn *connection.IRODSConnection, group, user string) error

RmFromGroup removes a user from a group.

func RmUser added in v0.4.5

func RmUser(conn *connection.IRODSConnection, user string) error

RmUser removes a user or a group.

func SearchCollectionsByMeta added in v0.4.2

func SearchCollectionsByMeta(conn *connection.IRODSConnection, metaName string, metaValue string) ([]*types.IRODSCollection, error)

SearchCollectionsByMeta searches collections by metadata

func SearchCollectionsByMetaWildcard added in v0.4.2

func SearchCollectionsByMetaWildcard(conn *connection.IRODSConnection, metaName string, metaValue string) ([]*types.IRODSCollection, error)

SearchCollectionsByMetaWildcard searches collections by metadata Caution: This is a very slow operation

func SearchDataObjectsByMeta added in v0.4.2

func SearchDataObjectsByMeta(conn *connection.IRODSConnection, metaName string, metaValue string) ([]*types.IRODSDataObject, error)

SearchDataObjectsByMeta searches data objects by metadata

func SearchDataObjectsByMetaWildcard added in v0.4.2

func SearchDataObjectsByMetaWildcard(conn *connection.IRODSConnection, metaName string, metaValue string) ([]*types.IRODSDataObject, error)

SearchDataObjectsByMetaWildcard searches data objects by metadata Caution: This is a very slow operation

func SearchDataObjectsMasterReplicaByMeta added in v0.4.3

func SearchDataObjectsMasterReplicaByMeta(conn *connection.IRODSConnection, metaName string, metaValue string) ([]*types.IRODSDataObject, error)

SearchDataObjectsMasterReplicaByMeta searches data objects by metadata, returns only master replica

func SearchDataObjectsMasterReplicaByMetaWildcard added in v0.4.3

func SearchDataObjectsMasterReplicaByMetaWildcard(conn *connection.IRODSConnection, metaName string, metaValue string) ([]*types.IRODSDataObject, error)

SearchDataObjectsMasterReplicaByMetaWildcard searches data objects by metadata, returns only master replica Caution: This is a very slow operation

func SeekDataObject

func SeekDataObject(conn *connection.IRODSConnection, handle *types.IRODSFileHandle, offset int64, whence types.Whence) (int64, error)

SeekDataObject moves file pointer of a data object, returns offset

func SetGroupQuota added in v0.4.5

func SetGroupQuota(conn *connection.IRODSConnection, group, resource, value string) error

SetGroupQuota sets quota for a given user and resource ('total' for global)

func SetInheritAccessControl added in v0.4.5

func SetInheritAccessControl(conn *connection.IRODSConnection, path string, inherit, recursive, adminFlag bool) error

SetInheritAccessControl sets the inherit bit on a collection.

func SetUserQuota added in v0.4.5

func SetUserQuota(conn *connection.IRODSConnection, user, resource, value string) error

SetUserQuota sets quota for a given user and resource ('total' for global)

func SupportParallUpload added in v0.5.2

func SupportParallUpload(conn *connection.IRODSConnection) bool

SupportParallUpload checks if current server supports parallel upload available from 4.2.9

func TrimDataObject added in v0.4.0

func TrimDataObject(conn *connection.IRODSConnection, path string, resource string, minCopies int, minAgeMinutes int, adminFlag bool) error

TrimDataObject trims replicas for a data object

func TruncateDataObject

func TruncateDataObject(conn *connection.IRODSConnection, path string, size int64) error

TruncateDataObject truncates a data object for the path to the given size

func UploadDataObject

func UploadDataObject(session *session.IRODSSession, localPath string, irodsPath string, resource string, replicate bool) error

UploadDataObject put a data object at the local path to the iRODS path

func UploadDataObjectParallel added in v0.5.2

func UploadDataObjectParallel(session *session.IRODSSession, localPath string, irodsPath string, resource string, fileLength int64, taskNum int, replicate bool) error

UploadDataObjectParallel put a data object at the local path to the iRODS path in parallel Partitions a file into n (taskNum) tasks and uploads in parallel

func UploadDataObjectParallelInBlockAsync added in v0.5.2

func UploadDataObjectParallelInBlockAsync(session *session.IRODSSession, localPath string, irodsPath string, resource string, fileLength int64, blockLength int64, taskNum int, replicate bool) (chan int64, chan error)

UploadDataObjectParallelInBlockAsync put a data object at the local path to the iRODS path in parallel Chunks a file into fixed-size blocks and transfers them using n (taskNum) tasks in parallel

func WriteDataObject

func WriteDataObject(conn *connection.IRODSConnection, handle *types.IRODSFileHandle, data []byte) error

WriteDataObject writes data to a data object

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL