blob: 3f30a4e9ac499084e54ecf6c0f4f8a951a5510d0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
local lclient = require 'lclient'
local util = require 'utility'
local ws = require 'workspace'
local files = require 'files'
local furi = require 'file-uri'
local fs = require 'bee.filesystem'
local libraryPath = LOGPATH .. '/large-file-library'
local largeFilePath = LOGPATH .. '/large-file-library/large-file.lua'
---@async
lclient():start(function (client)
client:registerFakers()
client:register('workspace/configuration', function ()
return {
{
['workspace.library'] = { libraryPath }
},
}
end)
fs.create_directories(fs.path(libraryPath))
if not fs.exists(fs.path(largeFilePath)) then
util.saveFile(largeFilePath, string.rep('--this is a large file\n', 100000))
end
client:initialize()
ws.awaitReady()
assert(files.getState(furi.encode(largeFilePath)) ~= nil)
end)
|