예제 #1
0
파일: files.py 프로젝트: imiklos/gecko-dev
    def get(self, path):
        srcpath = os.path.join(self.base, path)
        if not os.path.lexists(srcpath):
            return None

        for p in self.ignore:
            if mozpath.match(path, p):
                return None

        if self.find_executables and is_executable(srcpath):
            return ExecutableFile(srcpath)
        else:
            return File(srcpath)
예제 #2
0
파일: files.py 프로젝트: luke-chang/gecko-1
    def get(self, path):
        srcpath = os.path.join(self.base, path)
        if not os.path.lexists(srcpath):
            return None

        for p in self.ignore:
            if mozpath.match(path, p):
                return None

        if self.find_executables and is_executable(srcpath):
            return ExecutableFile(srcpath)
        else:
            return File(srcpath)
예제 #3
0
파일: files.py 프로젝트: hibrium/Pale-Moon
    def _find_file(self, path):
        '''
        Actual implementation of FileFinder.find() when the given pattern
        corresponds to an existing file under the base directory.
        '''
        srcpath = os.path.join(self.base, path)
        if not os.path.exists(srcpath):
            return

        if is_executable(srcpath):
            yield path, ExecutableFile(srcpath)
        else:
            yield path, File(srcpath)
예제 #4
0
    def _find_file(self, path):
        '''
        Actual implementation of FileFinder.find() when the given pattern
        corresponds to an existing file under the base directory.
        '''
        srcpath = os.path.join(self.base, path)
        if not os.path.exists(srcpath):
            return

        if self.find_executables and is_executable(srcpath):
            yield path, ExecutableFile(srcpath)
        else:
            yield path, File(srcpath)
예제 #5
0
파일: files.py 프로젝트: c0mmandCS/Waterfox
    def _find_file(self, path):
        """
        Actual implementation of FileFinder.find() when the given pattern
        corresponds to an existing file under the base directory.
        """
        srcpath = os.path.join(self.base, path)
        if not os.path.exists(srcpath):
            return

        for p in self.ignore:
            if mozpath.match(path, p):
                return

        if self.find_executables and is_executable(srcpath):
            yield path, ExecutableFile(srcpath)
        else:
            yield path, File(srcpath)