xref: /aosp_15_r20/external/licenseclassifier/file_system_resources.go (revision 46c4c49da23cae783fa41bf46525a6505638499a)
1*46c4c49dSIbrahim Kanouche// Copyright 2017 Google Inc.
2*46c4c49dSIbrahim Kanouche//
3*46c4c49dSIbrahim Kanouche// Licensed under the Apache License, Version 2.0 (the "License");
4*46c4c49dSIbrahim Kanouche// you may not use this file except in compliance with the License.
5*46c4c49dSIbrahim Kanouche// You may obtain a copy of the License at
6*46c4c49dSIbrahim Kanouche//
7*46c4c49dSIbrahim Kanouche//     http://www.apache.org/licenses/LICENSE-2.0
8*46c4c49dSIbrahim Kanouche//
9*46c4c49dSIbrahim Kanouche// Unless required by applicable law or agreed to in writing, software
10*46c4c49dSIbrahim Kanouche// distributed under the License is distributed on an "AS IS" BASIS,
11*46c4c49dSIbrahim Kanouche// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12*46c4c49dSIbrahim Kanouche// See the License for the specific language governing permissions and
13*46c4c49dSIbrahim Kanouche// limitations under the License.
14*46c4c49dSIbrahim Kanouche
15*46c4c49dSIbrahim Kanouchepackage licenseclassifier
16*46c4c49dSIbrahim Kanouche
17*46c4c49dSIbrahim Kanoucheimport (
18*46c4c49dSIbrahim Kanouche	"github.com/google/licenseclassifier/licenses"
19*46c4c49dSIbrahim Kanouche)
20*46c4c49dSIbrahim Kanouche
21*46c4c49dSIbrahim Kanoucheconst (
22*46c4c49dSIbrahim Kanouche	// LicenseArchive is the name of the archive containing preprocessed
23*46c4c49dSIbrahim Kanouche	// license texts.
24*46c4c49dSIbrahim Kanouche	LicenseArchive = "licenses.db"
25*46c4c49dSIbrahim Kanouche	// ForbiddenLicenseArchive is the name of the archive containing preprocessed
26*46c4c49dSIbrahim Kanouche	// forbidden license texts only.
27*46c4c49dSIbrahim Kanouche	ForbiddenLicenseArchive = "forbidden_licenses.db"
28*46c4c49dSIbrahim Kanouche)
29*46c4c49dSIbrahim Kanouche
30*46c4c49dSIbrahim Kanouche// ReadLicenseFile locates and reads the license archive file.  Absolute paths are used unmodified.  Relative paths are expected to be in the licenses directory of the licenseclassifier package.
31*46c4c49dSIbrahim Kanouchevar ReadLicenseFile = licenses.ReadLicenseFile
32*46c4c49dSIbrahim Kanouche
33*46c4c49dSIbrahim Kanouche// ReadLicenseDir reads directory containing the license files.
34*46c4c49dSIbrahim Kanouchevar ReadLicenseDir = licenses.ReadLicenseDir
35