// *** Internal Methods *********************************************
 internal DirectoryImpl(FileSystem owner, DirectoryImpl parent, string fullname, string localname)
 {
     _owner     = owner;
     _parent    = parent;
     _fullname  = fullname;
     _localname = localname;
 }
예제 #2
0
        // *** Public Methods ***********************************************
        public FileSystem(string svc, string accessKeyId, string secretAccessKey, string bucket, string acl)
        {
            if(svc == "REST") {
                _svc = new RestStorageService();
            } else if(svc == "SOAP") {
                _svc = new SoapStorageService();
            } else {
                throw new ArgumentException();
            }

            if(acl == "PrivateOnly") {
                _acl = AWSGrant.PrivateOnly;
            } else if(acl == "PublicRead") {
                _acl = AWSGrant.PublicRead;
            } else if(acl == "PublicWrite") {
                _acl = AWSGrant.PublicWrite;
            } else {
                throw new ArgumentException();
            }

            _svc.AccessKeyId     = accessKeyId;
            _svc.SecretAccessKey = secretAccessKey;

            _bucket = bucket;
            _root   = new DirectoryImpl(this, null, "", _bucket);
        }
예제 #3
0
 // *** Internal Methods *********************************************
 internal FileImpl(FileSystem owner, DirectoryImpl parent, string fullname, string localname, long size, string contentType)
 {
     _owner       = owner;
     _parent      = parent;
     _fullname    = fullname;
     _localname   = localname;
     _size        = size;
     _contentType = contentType;
 }