Esempio n. 1
0
        public DAVOperations(DAVProtocol protocol,
                             String host,
                             int port,
                             String basePath,
                             String username,
                             String password,
                             Func <string, DAVSize> sizeFunc)
        {
            string userHome = Environment.GetEnvironmentVariable("USERPROFILE");

            memfs = new MemFileSystem(userHome + "\\.davfs\\");


            client = new WebdavClient.DAVClient(protocol,
                                                host,
                                                port,
                                                basePath,
                                                username,
                                                password);

            CacheMillis = 30 * 1000;
            FillList("/");

            this.username = username;
            this.password = password;
            this.sizeFunc = sizeFunc;

            Console.WriteLine("This is a beautiful day");
        }
Esempio n. 2
0
        public DAVOperations(DAVProtocol protocol,
                             String host,
                             int port,
                             String basePath,
                             String username,
                             String password,
                             Func<string, DAVSize> sizeFunc)
        {
            string userHome = Environment.GetEnvironmentVariable("USERPROFILE");
            memfs = new MemFileSystem(userHome + "\\.davfs\\");

            client = new WebdavClient.DAVClient(protocol,
                                                host,
                                                port,
                                                basePath,
                                                username,
                                                password);

            CacheMillis = 30 * 1000;
            FillList("/");

            this.username = username;
            this.password = password;
            this.sizeFunc = sizeFunc;

            Console.WriteLine("This is a beautiful day");
        }
Esempio n. 3
0
        /*
         * Ok, a few general rules to use this class...
         *
         * basePath MUST start with a SLASH, and MUST NOT end with a slash
         *
         * Your relative paths, MUST start with a slash for every method :)
         *
         */

        //TODO: closures

        /*
         * I feel like using closures but I don't know the language API well enough
         */

        public DAVClient(DAVProtocol protocol, String host, int port, String basePath, String username, String password)
        {
            this.protocol = protocol;
            this.host     = host;
            this.port     = port;
            this.basePath = basePath;
            this.username = username;
            this.password = password;
        }