(url *common.URL)
| 63 | } |
| 64 | |
| 65 | func newFileSystemDynamicConfiguration(url *common.URL) (*FileSystemDynamicConfiguration, error) { |
| 66 | encode := url.GetParam(ConfigCenterEncodingParamName, defaultConfigCenterEncoding) |
| 67 | |
| 68 | root := url.GetParam(ConfigCenterDirParamName, "") |
| 69 | var c *FileSystemDynamicConfiguration |
| 70 | |
| 71 | root, err := mkdirIfNecessary(root) |
| 72 | if err != nil { |
| 73 | return nil, err |
| 74 | } |
| 75 | |
| 76 | c = &FileSystemDynamicConfiguration{ |
| 77 | url: url, |
| 78 | rootPath: root, |
| 79 | encoding: encode, |
| 80 | } |
| 81 | |
| 82 | c.cacheListener = NewCacheListener(c.rootPath) |
| 83 | |
| 84 | return c, nil |
| 85 | } |
| 86 | |
| 87 | // RootPath get root path |
| 88 | func (fsdc *FileSystemDynamicConfiguration) RootPath() string { |
no test coverage detected