fs

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2022 License: BSD-3-Clause Imports: 17 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 string, child string, 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 AddGroupMember added in v0.10.0

func AddGroupMember(conn *connection.IRODSConnection, groupname string, username string, zone string) error

AddGroupMember adds a user to 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 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 ChangeCollectionAccess added in v0.9.4

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

ChangeCollectionAccess changes access on a collection.

func ChangeDataObjectAccess added in v0.9.4

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

ChangeDataObjectAccess changes access control on a data object.

func ChangeUserPassword added in v0.10.0

func ChangeUserPassword(conn *connection.IRODSConnection, username string, zone string, newPassword string) error

ChangeUserPassword changes the password of a user object

func ChangeUserType added in v0.4.5

func ChangeUserType(conn *connection.IRODSConnection, username string, zone string, 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, mode string, force bool) (*types.IRODSFileHandle, error)

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

func CreateGroup added in v0.10.0

func CreateGroup(conn *connection.IRODSConnection, groupname string, groupType string) error

CreateGroup creates a group.

func CreateUser added in v0.10.0

func CreateUser(conn *connection.IRODSConnection, username string, zone string, userType string) error

CreateUser creates a user.

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, callback TrackerCallBack) 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, callback TrackerCallBack) 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 ExtractStructFile added in v0.9.4

func ExtractStructFile(conn *connection.IRODSConnection, path string, target string, resource string, dataType types.DataType, force bool) error

ExtractStructFile extracts a struct file for the path

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 GetTicketForAnonymousAccess added in v0.7.0

func GetTicketForAnonymousAccess(conn *connection.IRODSConnection, ticket string) (*types.IRODSTicketForAnonymousAccess, error)

https://github.com/irods/irods_client_s3_ticketbooth/blob/b92e8aaa3127cb56fcb8fef09caa00244bd29ca6/ticket_booth/main.py GetTicketForAnonymousAccess returns minimal ticket information for the ticket string

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 ListAccessesForDataObjects added in v0.9.4

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

ListAccessesForDataObjects returns data object accesses for data objects in the given path

func ListAccessesForSubCollections added in v0.9.4

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

ListAccessesForSubCollections returns collection accesses for subcollections in the given path

func ListCollectionAccesses added in v0.9.4

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

ListCollectionAccesses 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 ListDataObjectAccesses added in v0.9.4

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

ListDataObjectAccesses 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, buffer []byte) (int, error)

ReadDataObject reads data from a data object

func RemoveGroupMember added in v0.10.0

func RemoveGroupMember(conn *connection.IRODSConnection, groupname string, username string, zone string) error

RemoveGroupMember removes a user from a group.

func RemoveUser added in v0.10.0

func RemoveUser(conn *connection.IRODSConnection, username string, zone string) error

RemoveUser removes a user or a group.

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 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 SetAccessInherit added in v0.9.4

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

SetAccessInherit sets the inherit bit on a collection.

func SetGroupQuota added in v0.4.5

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

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

func SetUserQuota added in v0.4.5

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

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

func StatProcess added in v0.9.7

func StatProcess(conn *connection.IRODSConnection, address string, zone string) ([]*types.IRODSProcess, error)

StatProcess stats processes.

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 TruncateDataObjectHandle added in v0.7.0

func TruncateDataObjectHandle(conn *connection.IRODSConnection, handle *types.IRODSFileHandle, size int64) error

TruncateDataObjectHandle truncates a data object to the given size

func UploadDataObject

func UploadDataObject(session *session.IRODSSession, localPath string, irodsPath string, resource string, replicate bool, callback TrackerCallBack) 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, taskNum int, replicate bool, callback TrackerCallBack) 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, 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

type TrackerCallBack added in v0.9.4

type TrackerCallBack func(processed int64, total int64)

Jump to

Keyboard shortcuts

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