@@ -684,6 +684,9 @@ func Read(file util.File, size, start, sectorsize int64) (*FileSystem, error) {
684
684
}, nil
685
685
}
686
686
687
+ // interface guard
688
+ var _ filesystem.FileSystem = (* FileSystem )(nil )
689
+
687
690
// Type returns the type code for the filesystem. Always returns filesystem.TypeExt4
688
691
func (fs * FileSystem ) Type () filesystem.Type {
689
692
return filesystem .TypeExt4
@@ -699,6 +702,22 @@ func (fs *FileSystem) Mkdir(p string) error {
699
702
return err
700
703
}
701
704
705
+ // creates a filesystem node (file, device special file, or named pipe) named pathname,
706
+ // with attributes specified by mode and dev
707
+ func (fs * FileSystem ) Mknod (path string , mode uint32 , dev int ) error {
708
+ return filesystem .ErrNotImplemented
709
+ }
710
+
711
+ // creates a new link (also known as a hard link) to an existing file.
712
+ func (fs * FileSystem ) Link (oldpath string , newpath string ) error {
713
+ return filesystem .ErrNotImplemented
714
+ }
715
+
716
+ // creates a symbolic link named linkpath which contains the string target.
717
+ func (fs * FileSystem ) Symlink (oldpath string , newpath string ) error {
718
+ return filesystem .ErrNotImplemented
719
+ }
720
+
702
721
// ReadDir return the contents of a given directory in a given filesystem.
703
722
//
704
723
// Returns a slice of os.FileInfo with all of the entries in the directory.
@@ -808,12 +827,17 @@ func (fs *FileSystem) Label() string {
808
827
return fs .superblock .volumeLabel
809
828
}
810
829
811
- // Rm remove file or directory at path.
830
+ // FIXME: API backwards compatibility
831
+ func (fs * FileSystem ) Rm (p string ) error {
832
+ return fs .Remove (p )
833
+ }
834
+
835
+ // Removes file or directory at path.
812
836
// If path is directory, it only will remove if it is empty.
813
837
// If path is a file, it will remove the file.
814
838
// Will not remove any parents.
815
839
// Error if the file does not exist or is not an empty directory
816
- func (fs * FileSystem ) Rm (p string ) error {
840
+ func (fs * FileSystem ) Remove (p string ) error {
817
841
parentDir , entry , err := fs .getEntryAndParent (p )
818
842
if err != nil {
819
843
return err
0 commit comments