How to use the @jupyterlab/services.ContentsManager function in @jupyterlab/services

To help you get started, we’ve selected a few @jupyterlab/services examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jupyterlab / jupyterlab / tests / test-services / src / contents / index.spec.ts View on Github external
it('should accept no options', () => {
      const contents = new ContentsManager();
      expect(contents).to.be.an.instanceof(ContentsManager);
    });
github jupyterlab / jupyterlab / tests / test-services / src / contents / index.spec.ts View on Github external
it('should get the url of a file from an additional drive', async () => {
      const contents = new ContentsManager();
      const other = new Drive({ name: 'other', serverSettings: settings });
      contents.addDrive(other);
      const test1 = contents.getDownloadUrl('other:bar.txt');
      const test2 = contents.getDownloadUrl('other:fizz/buzz/bar.txt');
      const test3 = contents.getDownloadUrl('other:/bar.txt');
      const urls = await Promise.all([test1, test2, test3]);
      expect(urls[0]).to.equal('http://foo/files/bar.txt');
      expect(urls[1]).to.equal('http://foo/files/fizz/buzz/bar.txt');
      expect(urls[2]).to.equal('http://foo/files/bar.txt');
    });
  });
github jupyterlab / jupyterlab-data-explorer / tests / test-services / src / contents / index.spec.ts View on Github external
it('should get the url of a file from an additional drive', async () => {
      const contents = new ContentsManager();
      const other = new Drive({ name: 'other', serverSettings: settings });
      contents.addDrive(other);
      const test1 = contents.getDownloadUrl('other:bar.txt');
      const test2 = contents.getDownloadUrl('other:fizz/buzz/bar.txt');
      const test3 = contents.getDownloadUrl('other:/bar.txt');
      const urls = await Promise.all([test1, test2, test3]);
      expect(urls[0]).to.equal('http://foo/files/bar.txt');
      expect(urls[1]).to.equal('http://foo/files/fizz/buzz/bar.txt');
      expect(urls[2]).to.equal('http://foo/files/bar.txt');
    });
  });
github jupyterlab / jupyterlab-data-explorer / tests / test-services / src / contents / index.spec.ts View on Github external
it('should accept no options', () => {
      const contents = new ContentsManager();
      expect(contents).to.be.an.instanceof(ContentsManager);
    });
github jupyterlab / jupyterlab / tests / test-services / src / contents / index.spec.ts View on Github external
it('should get the url of a file', async () => {
      const drive = new Drive({ serverSettings: settings });
      const contents = new ContentsManager({ defaultDrive: drive });
      const test1 = contents.getDownloadUrl('bar.txt');
      const test2 = contents.getDownloadUrl('fizz/buzz/bar.txt');
      const test3 = contents.getDownloadUrl('/bar.txt');
      const urls = await Promise.all([test1, test2, test3]);
      expect(urls[0]).to.equal('http://foo/files/bar.txt');
      expect(urls[1]).to.equal('http://foo/files/fizz/buzz/bar.txt');
      expect(urls[2]).to.equal('http://foo/files/bar.txt');
    });
github jupyterlab / jupyterlab-data-explorer / tests / test-services / src / contents / index.spec.ts View on Github external
it('should encode characters', async () => {
      const drive = new Drive({ serverSettings: settings });
      const contents = new ContentsManager({ defaultDrive: drive });
      const url = await contents.getDownloadUrl('b ar?3.txt');
      expect(url).to.equal('http://foo/files/b%20ar%3F3.txt');
    });
github jupyterlab / jupyterlab / tests / test-services / src / contents / index.spec.ts View on Github external
beforeEach(() => {
    serverSettings = makeSettings();
    contents = new ContentsManager({ serverSettings });
  });
github jupyterlab / jupyterlab-data-explorer / tests / test-services / src / contents / index.spec.ts View on Github external
beforeEach(() => {
    contents = new ContentsManager({ serverSettings });
  });
github jupyterlab / jupyterlab-data-explorer / tests / test-services / src / contents / index.spec.ts View on Github external
beforeEach(() => {
    serverSettings = makeSettings();
    contents = new ContentsManager({ serverSettings });
  });
github DonJayamanne / pythonVSCode / src / client / datascience / jupyter / jupyterSessionManager.ts View on Github external
public async initialize(connInfo: IConnection): Promise {
        this.connInfo = connInfo;
        this.serverSettings = await this.getServerConnectSettings(connInfo);
        this.sessionManager = new SessionManager({ serverSettings: this.serverSettings });
        this.contentsManager = new ContentsManager({ serverSettings: this.serverSettings });
    }