in desktop/src/app/services/azure-batch/file/file.service.ts [85:131]
constructor(private http: AzureBatchHttpService, private fs: FileSystemService) {
this._taskFileGetter = new BasicEntityGetter(File, {
cache: (params) => this.getTaskFileCache(params),
supplyData: ({ jobId, taskId, name }) => {
name = encodeURIComponent(name);
const uri = `/jobs/${jobId}/tasks/${taskId}/files/${name}`;
return this.http.head(uri, { observe: "response" }).pipe(
map((response) => {
return this._parseHeadersToFile(response.headers, name);
}),
share(),
);
},
});
this._nodeFileGetter = new BasicEntityGetter(File, {
cache: (params) => this.getNodeFileCache(params),
supplyData: ({ poolId, nodeId, name }) => {
name = encodeURIComponent(name);
const uri = `/pools/${poolId}/nodes/${nodeId}/files/${name}`;
return this.http.head(uri, { observe: "response" }).pipe(
map((response) => {
return this._parseHeadersToFile(response.headers, name);
}),
share(),
);
},
});
this._taskFileListGetter = new BasicListGetter(File, {
cache: (params) => this.getTaskFileCache(params),
supplyData: (params, options, nextLink) => {
const uri = nextLink || `/jobs/${params.jobId}/tasks/${params.taskId}/files`;
return this._listFiles(uri, options, nextLink);
},
logIgnoreError: fileIgnoredErrors,
});
this._nodeFileListGetter = new BasicListGetter(File, {
cache: (params) => this.getNodeFileCache(params),
supplyData: (params, options, nextLink) => {
const uri = nextLink || `/pools/${params.poolId}/nodes/${params.nodeId}/files`;
return this._listFiles(uri, options, nextLink);
},
logIgnoreError: fileIgnoredErrors,
});
}