qbittorrent fs

This commit is contained in:
royalcat 2024-09-01 02:00:13 +03:00
parent ae4501ae21
commit f75188b412
51 changed files with 4048 additions and 231 deletions
src/vfs

View file

@ -109,3 +109,25 @@ func (fi *fileInfo) IsDir() bool {
func (fi *fileInfo) Sys() interface{} {
return nil
}
type FilesystemPrototype string
// Info implements Filesystem.
func (p FilesystemPrototype) Info() (fs.FileInfo, error) {
return NewDirInfo(string(p)), nil
}
// IsDir implements Filesystem.
func (p FilesystemPrototype) IsDir() bool {
return true
}
// Name implements Filesystem.
func (p FilesystemPrototype) Name() string {
return string(p)
}
// Type implements Filesystem.
func (p FilesystemPrototype) Type() fs.FileMode {
return fs.ModeDir
}