File: trash_dir_volume_reader.py

package info (click to toggle)
trash-cli 0.24.5.26-0.3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,972 kB
  • sloc: python: 9,789; sh: 121; makefile: 11
file content (15 lines) | stat: -rw-r--r-- 388 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import os

from trashcli.put.fs.fs import RealPathFs


class TrashDirVolumeReader:
    def __init__(self,
                 fs,  # type: RealPathFs
                 ):
        self.fs = fs

    def volume_of_trash_dir(self, trash_dir_path):
        norm_trash_dir_path = os.path.normpath(trash_dir_path)
        return self.fs.volume_of(
            self.fs.realpath(norm_trash_dir_path))