All checks were successful
Release Tag / release (push) Successful in 9s
- Changed module name from `s1d3sw1ped/SteamCache2` to `s1d3sw1ped/steamcache2` for consistency. - Updated all import paths and references throughout the codebase to reflect the new module name. - Adjusted README and Makefile to use the updated module name, ensuring clarity in usage instructions.
47 lines
1.3 KiB
Go
47 lines
1.3 KiB
Go
// vfs/vfs.go
|
|
package vfs
|
|
|
|
import (
|
|
"io"
|
|
"s1d3sw1ped/steamcache2/vfs/types"
|
|
)
|
|
|
|
// VFS defines the interface for virtual file systems
|
|
type VFS interface {
|
|
// Create creates a new file at the given key
|
|
Create(key string, size int64) (io.WriteCloser, error)
|
|
|
|
// Open opens the file at the given key for reading
|
|
Open(key string) (io.ReadCloser, error)
|
|
|
|
// Delete removes the file at the given key
|
|
Delete(key string) error
|
|
|
|
// Stat returns information about the file at the given key
|
|
Stat(key string) (*types.FileInfo, error)
|
|
|
|
// Name returns the name of this VFS
|
|
Name() string
|
|
|
|
// Size returns the current size of the VFS
|
|
Size() int64
|
|
|
|
// Capacity returns the maximum capacity of the VFS
|
|
Capacity() int64
|
|
}
|
|
|
|
// FileInfo is an alias for types.FileInfo for backward compatibility
|
|
type FileInfo = types.FileInfo
|
|
|
|
// NewFileInfo is an alias for types.NewFileInfo for backward compatibility
|
|
var NewFileInfo = types.NewFileInfo
|
|
|
|
// NewFileInfoFromOS is an alias for types.NewFileInfoFromOS for backward compatibility
|
|
var NewFileInfoFromOS = types.NewFileInfoFromOS
|
|
|
|
// BatchedTimeUpdate is an alias for types.BatchedTimeUpdate for backward compatibility
|
|
type BatchedTimeUpdate = types.BatchedTimeUpdate
|
|
|
|
// NewBatchedTimeUpdate is an alias for types.NewBatchedTimeUpdate for backward compatibility
|
|
var NewBatchedTimeUpdate = types.NewBatchedTimeUpdate
|