gets an legacy filesystem name
332757
function getLegacySystemName(tuple) {
    if (Array.isArray(tuple)) {
      var verb = tuple[0]
      var path = getLegacyLambdaName(tuple[1])
      return `${verb}${path}`
    }
    else {
      var path = getLegacyLambdaName(tuple)
      return `get${path}`
    }
  }
1203202
def _getPFilename(self,native,prompt):
        
        return self.get(native=native,prompt=prompt)
998512
private String getFileName(String name) {
        //check if the environment is linux or windows
        if (name.contains(Constants.FORWARD_SLASH)) {
            name = name.substring(name.lastIndexOf(Constants.FORWARD_SLASH) + 1, name.length());
        } else if (name.contains(Constants.BACK_SLASH)) {
            name = name.substring(name.lastIndexOf(Constants.BACK_SLASH) + 1, name.length());
        }
        return name;
    }
268188
def GetMountpoints():
  """"""
  devices = {}

  for filesys in GetFileSystems():
    devices[filesys.f_mntonname] = (filesys.f_mntfromname, filesys.f_fstypename)

  return devices
1089989
def decode_filesystem_name(filename):
    
    result = []
    remain = filename
    i = 0
    while remain:
        # use match, to ensure it matches from the start of the string...
        match = _FILESYSTEM_TOKEN_RE.match(remain)
        if not match:
            raise ValueError("incorrectly encoded filesystem name %r"
                             " (bad index: %d - %r)" % (filename, i,
                                                        remain[:2]))
        match_str = match.group(0)
        match_len = len(match_str)
        i += match_len
        remain = remain[match_len:]
        match_dict = match.groupdict()
        if match_dict['as_is']:
            result.append(unicode(match_str))
        elif match_dict['underscore']:
            result.append(u'_')
        elif match_dict['uppercase']:
            result.append(unicode(match_dict['uppercase'].upper()))
        elif match_dict['N']:
            N = int(match_dict['N'])
            if N == 0:
                N = 1
            # hex-encoded, so need to grab 2*N chars
            bytes_len = 2 * N
            i += bytes_len
            bytes = remain[:bytes_len]
            remain = remain[bytes_len:]

            # need this check to ensure that we don't end up eval'ing
            # something nasty...
            if not _HEX_RE.match(bytes):
                raise ValueError("Bad utf8 encoding in name %r"
                                 " (bad index: %d - %r)" % (filename, i, bytes))

            bytes_repr = ''.join('\\x%s' % bytes[i:i + 2]
                                 for i in xrange(0, bytes_len, 2))
            bytes_repr = "'%s'" % bytes_repr
            result.append(eval(bytes_repr).decode('utf8'))
        else:
            raise ValueError("Unrecognized match type in filesystem name %r"
                             " (bad index: %d - %r)" % (filename, i, remain[:2]))

    return u''.join(result)
437444
def _get_filesystem_path(self, url_path, basedir=settings.MEDIA_ROOT):
        """"""

        if url_path.startswith(settings.MEDIA_URL):
            url_path = url_path[len(settings.MEDIA_URL):]  # strip media root url

        return os.path.normpath(os.path.join(basedir, url2pathname(url_path)))
66612
def fsroot(self):
        """"""
        if self.osname == 'windows':
            return '{}:\\'.format(
                self._handler.inspect_get_drive_mappings(self._root)[0][0])
        else:
            return self._handler.inspect_get_mountpoints(self._root)[0][0]
685989
def get_system_by_name(self, name):
        """"""

        for elem in self.systems:
            if elem.name == name:
                return elem
        return None
1331241
def get_dirname(self, index):
        """"""
        fname = self.get_filename(index)
        if fname:
            if osp.isdir(fname):
                return fname
            else:
                return osp.dirname(fname)
1042200
def extract_version_from_filename(filename):
    """"""
    filename = os.path.splitext(os.path.basename(filename))[0]
    if filename.endswith('.tar'):
        filename = os.path.splitext(filename)[0]
    return filename.partition('-')[2]
670048
def _get_fs(thin_pathname):
        
        cmd = ['lsblk', '-o', 'FSTYPE', '-n', thin_pathname]
        fs_return = util.subp(cmd)
        return fs_return.stdout.strip()
977179
def rm_filesystems(name, device, config='/etc/filesystems'):
    '''
    
    '''
    modified = False
    view_lines = []

    if 'AIX' not in __grains__['kernel']:
        return modified

    criteria = _FileSystemsEntry(name=name, dev=device)
    try:
        fsys_filedict = _filesystems(config, False)
        for fsys_view in six.viewitems(fsys_filedict):
            try:
                if criteria.match(fsys_view):
                    modified = True
                else:
                    view_lines.append(fsys_view)

            except _FileSystemsEntry.ParseError:
                view_lines.append(fsys_view)

    except (IOError, OSError) as exc:
        raise CommandExecutionError("Couldn't read from {0}: {1}".format(config, exc))

    if modified:
        try:
            with salt.utils.files.fopen(config, 'wb') as ofile:
                for fsys_view in view_lines:
                    entry = fsys_view[1]
                    mystrg = _FileSystemsEntry.dict_to_lines(entry)
                    ofile.writelines(salt.utils.data.encode(mystrg))
        except (IOError, OSError) as exc:
            raise CommandExecutionError("Couldn't write to {0}: {1}".format(config, exc))

    return modified
937620
def path(self):
        """"""
        names = []
        obj = self
        while obj:
            names.insert(0, obj.name)
            obj = obj.parent_dir
        sep = self.filesystem._path_separator(self.name)
        if names[0] == sep:
            names.pop(0)
            dir_path = sep.join(names)
            # Windows paths with drive have a root separator entry
            # which should be removed
            is_drive = names and len(names[0]) == 2 and names[0][1] == ':'
            if not is_drive:
                dir_path = sep + dir_path
        else:
            dir_path = sep.join(names)
        dir_path = self.filesystem.absnormpath(dir_path)
        return dir_path
915914
def get_filename(self, index):
        """"""
        if index:
            return osp.normpath(to_text_string(self.fsmodel.filePath(index)))
964258
def _get_filename(self):
        """"""
        if self._fname is None:
            timestamp = datetime.datetime.now().strftime("%Y%m%d-%H%M%S")
            fname = "%s-%s.log" % (timestamp, abs(id(self)))
            self._fname = os.path.join(self.file_path, fname)
        return self._fname
573563
def stored_version(self, name):
        """"""
        link_path = self._link_path(name)
        if not _path_exists(link_path):
            return None
        return _file_version(link_path)
929838
def get_db_name(self, fname):
        """"""
        return self.funcs.db_func(fname, self.outdir, self.exes.format_exe)[1]