Home
last modified time | relevance | path

Searched refs:filename (Results 1 – 25 of 104) sorted by relevance

12345

/packages/apps/UnifiedEmail/src/org/apache/commons/io/
DFilenameUtils.java203 public static String normalize(String filename) { in normalize() argument
204 return doNormalize(filename, true); in normalize()
249 public static String normalizeNoEndSeparator(String filename) { in normalizeNoEndSeparator() argument
250 return doNormalize(filename, false); in normalizeNoEndSeparator()
260 private static String doNormalize(String filename, boolean keepSeparator) { in doNormalize() argument
261 if (filename == null) { in doNormalize()
264 int size = filename.length(); in doNormalize()
266 return filename; in doNormalize()
268 int prefix = getPrefixLength(filename); in doNormalize()
274 filename.getChars(0, filename.length(), array, 0); in doNormalize()
[all …]
/packages/apps/Bluetooth/src/com/android/bluetooth/opp/
DBluetoothOppReceiveFileInfo.java83 public BluetoothOppReceiveFileInfo(String filename, long length, FileOutputStream outputStream, in BluetoothOppReceiveFileInfo() argument
85 mFileName = filename; in BluetoothOppReceiveFileInfo()
100 String filename = null, hint = null, mimeType = null; in generateFileInfo() local
144 filename = choosefilename(hint); in generateFileInfo()
145 if (filename == null) { in generateFileInfo()
150 int dotIndex = filename.lastIndexOf("."); in generateFileInfo()
159 extension = filename.substring(dotIndex); in generateFileInfo()
160 filename = filename.substring(0, dotIndex); in generateFileInfo()
162 if (D) Log.d(Constants.TAG, " File Name " + filename); in generateFileInfo()
164 if (filename.getBytes().length > OPP_LENGTH_OF_FILE_NAME) { in generateFileInfo()
[all …]
/packages/apps/Test/connectivity/sl4n/rapidjson/test/unittest/
Dencodedstreamtest.cpp43 static FILE* Open(const char* filename) { in Open() argument
53 sprintf(buffer, paths[i], filename); in Open()
61 static char *ReadFile(const char* filename, bool appendPath, size_t* outLength) { in ReadFile() argument
62 FILE *fp = appendPath ? Open(filename) : fopen(filename, "rb"); in ReadFile()
80 void TestEncodedInputStream(const char* filename) { in TestEncodedInputStream() argument
84 FILE *fp = Open(filename); in TestEncodedInputStream()
103 char* data = ReadFile(filename, true, &size); in TestEncodedInputStream()
120 void TestAutoUTFInputStream(const char *filename, bool expectHasBOM) { in TestAutoUTFInputStream() argument
124 FILE *fp = Open(filename); in TestAutoUTFInputStream()
143 char* data = ReadFile(filename, true, &size); in TestAutoUTFInputStream()
[all …]
Dunittest.h65 inline FILE* TempFile(char *filename) { in TempFile() argument
67 filename = tmpnam(filename); in TempFile()
70 if (filename[0] == '\\') in TempFile()
71 for (int i = 0; filename[i] != '\0'; i++) in TempFile()
72 filename[i] = filename[i + 1]; in TempFile()
74 return fopen(filename, "wb"); in TempFile()
76 strcpy(filename, "/tmp/fileXXXXXX"); in TempFile()
77 int fd = mkstemp(filename); in TempFile()
Djsoncheckertest.cpp21 static char* ReadFile(const char* filename, size_t& length) { in ReadFile() argument
32 sprintf(buffer, paths[i], filename); in ReadFile()
52 char filename[256]; in TEST() local
61 sprintf(filename, "fail%d.json", i); in TEST()
63 char* json = ReadFile(filename, length); in TEST()
65 printf("jsonchecker file %s not found", filename); in TEST()
82 sprintf(filename, "pass%d.json", i); in TEST()
84 char* json = ReadFile(filename, length); in TEST()
86 printf("jsonchecker file %s not found", filename); in TEST()
/packages/providers/DownloadProvider/src/com/android/providers/downloads/
DHelpers.java271 String filename = null;
274 if (filename == null && hint != null && !hint.endsWith("/")) {
280 filename = hint.substring(index);
282 filename = hint;
287 if (filename == null && contentDisposition != null) {
288 filename = parseContentDisposition(contentDisposition);
289 if (filename != null) {
293 int index = filename.lastIndexOf('/') + 1;
295 filename = filename.substring(index);
301 if (filename == null && contentLocation != null) {
[all …]
DDownloadDrmHelper.java49 public static String modifyDrmFwLockFileExtension(String filename) { in modifyDrmFwLockFileExtension() argument
50 if (filename != null) { in modifyDrmFwLockFileExtension()
52 extensionIndex = filename.lastIndexOf("."); in modifyDrmFwLockFileExtension()
54 filename = filename.substring(0, extensionIndex); in modifyDrmFwLockFileExtension()
56 filename = filename.concat(EXTENSION_INTERNAL_FWDL); in modifyDrmFwLockFileExtension()
58 return filename; in modifyDrmFwLockFileExtension()
/packages/experimental/procstatlog/
Dprocstatlog.c72 static void read_data(struct data *data, const char *filename) { in read_data() argument
74 data->name = strdup(filename); in read_data()
75 int fd = open(filename, O_RDONLY); in read_data()
83 perror(filename); in read_data()
103 const char *filename, in read_lines() argument
107 int fd = open(filename, O_RDONLY); in read_lines()
112 perror(filename); in read_lines()
124 int filename_len = strlen(filename); in read_lines()
145 unspace(data->name, filename, filename_len); in read_lines()
232 char filename[1024]; in read_stats() local
[all …]
/packages/services/Car/vehicle_monitor_service/
DProcessMonitor.cpp208 char filename[64]; in readStat() local
209 sprintf(filename, "/proc/%d/stat", pid); in readStat()
211 file = fopen(filename, "r"); in readStat()
213 ALOGD("Failed to open file %s for reading", filename); in readStat()
230 char filename[64]; in readIo() local
231 sprintf(filename, "/proc/%d/io", pid); in readIo()
233 file = fopen(filename, "r"); in readIo()
235 ALOGD("Failed to open file %s for reading", filename); in readIo()
246 char filename[64]; in readCmdline() local
247 sprintf(filename, "/proc/%d/cmdline", pid); in readCmdline()
[all …]
/packages/services/Car/tools/bootio/
Dbootio_collector.cpp68 int ReadIo(char *filename, AppSample *sample) { in ReadIo() argument
73 file = fopen(filename, "r"); in ReadIo()
93 int ReadStatForName(char *filename, AppData *app) { in ReadStatForName() argument
97 file = fopen(filename, "r"); in ReadStatForName()
114 int ReadStat(char *filename, AppSample *sample) { in ReadStat() argument
118 file = fopen(filename, "r"); in ReadStat()
148 int ReadCmdline(char *filename, AppData *app) { in ReadCmdline() argument
153 file = fopen(filename, "r"); in ReadCmdline()
170 char filename[64]; in ReadProcData() local
185 sprintf(filename, PID_STAT_FILE, pid); in ReadProcData()
[all …]
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/dictionarypack/
DAssetFileAddress.java32 public AssetFileAddress(final String filename, final long offset, final long length) { in AssetFileAddress() argument
33 mFilename = filename; in AssetFileAddress()
44 public static AssetFileAddress makeFromFileName(final String filename) { in makeFromFileName() argument
45 if (null == filename) return null; in makeFromFileName()
46 final File f = new File(filename); in makeFromFileName()
48 return new AssetFileAddress(filename, 0l, f.length()); in makeFromFileName()
59 public static AssetFileAddress makeFromFileNameAndOffset(final String filename, in makeFromFileNameAndOffset() argument
61 if (null == filename) return null; in makeFromFileNameAndOffset()
62 final File f = new File(filename); in makeFromFileNameAndOffset()
64 return new AssetFileAddress(filename, offset, length); in makeFromFileNameAndOffset()
/packages/apps/UnifiedEmail/src/org/apache/commons/io/output/
DFileWriterWithEncoding.java65 public FileWriterWithEncoding(String filename, String encoding) throws IOException { in FileWriterWithEncoding() argument
66 this(new File(filename), encoding, false); in FileWriterWithEncoding()
78 …public FileWriterWithEncoding(String filename, String encoding, boolean append) throws IOException… in FileWriterWithEncoding() argument
79 this(new File(filename), encoding, append); in FileWriterWithEncoding()
90 public FileWriterWithEncoding(String filename, Charset encoding) throws IOException { in FileWriterWithEncoding() argument
91 this(new File(filename), encoding, false); in FileWriterWithEncoding()
103 …public FileWriterWithEncoding(String filename, Charset encoding, boolean append) throws IOExceptio… in FileWriterWithEncoding() argument
104 this(new File(filename), encoding, append); in FileWriterWithEncoding()
115 public FileWriterWithEncoding(String filename, CharsetEncoder encoding) throws IOException { in FileWriterWithEncoding() argument
116 this(new File(filename), encoding, false); in FileWriterWithEncoding()
[all …]
/packages/apps/Camera2/src/com/android/camera/util/
DXmpUtil.java84 public static XMPMeta extractXMPMeta(String filename) { in extractXMPMeta() argument
85 if (!filename.toLowerCase().endsWith(".jpg") in extractXMPMeta()
86 && !filename.toLowerCase().endsWith(".jpeg")) { in extractXMPMeta()
92 return extractXMPMeta(new FileInputStream(filename)); in extractXMPMeta()
94 Log.e(TAG, "Could not read file: " + filename, e); in extractXMPMeta()
139 public static XMPMeta extractOrCreateXMPMeta(String filename) { in extractOrCreateXMPMeta() argument
140 XMPMeta meta = extractXMPMeta(filename); in extractOrCreateXMPMeta()
147 public static boolean writeXMPMeta(String filename, XMPMeta meta) { in writeXMPMeta() argument
148 if (!filename.toLowerCase().endsWith(".jpg") in writeXMPMeta()
149 && !filename.toLowerCase().endsWith(".jpeg")) { in writeXMPMeta()
[all …]
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/
DAssetFileAddress.java34 public AssetFileAddress(final String filename, final long offset, final long length) { in AssetFileAddress() argument
35 mFilename = filename; in AssetFileAddress()
45 public static AssetFileAddress makeFromFileName(final String filename) { in makeFromFileName() argument
46 if (null == filename) return null; in makeFromFileName()
47 return makeFromFile(new File(filename)); in makeFromFileName()
50 public static AssetFileAddress makeFromFileNameAndOffset(final String filename, in makeFromFileNameAndOffset() argument
52 if (null == filename) return null; in makeFromFileNameAndOffset()
53 final File f = new File(filename); in makeFromFileNameAndOffset()
55 return new AssetFileAddress(filename, offset, length); in makeFromFileNameAndOffset()
/packages/apps/DevCamera/src/com/android/devcamera/
DMediaSaver.java61 String filename = ""; in saveDepth() local
65 filename = String.format("/sdcard/DCIM/Depth_%05d.img", i); in saveDepth()
66 file = new File(filename); in saveDepth()
68 throw new IOException(filename); in saveDepth()
79 throw new IOException(filename); in saveDepth()
94 return filename; in saveDepth()
102 String filename = ""; in saveJpeg() local
107 filename = String.format("/sdcard/DCIM/Camera/SNAP_%05d.JPG", i); in saveJpeg()
108 file = new File(filename); in saveJpeg()
133 return filename; in saveJpeg()
/packages/apps/Messaging/src/com/android/messaging/mmslib/util/
DDownloadDrmHelper.java74 public static String modifyDrmFwLockFileExtension(String filename) { in modifyDrmFwLockFileExtension() argument
75 if (filename != null) { in modifyDrmFwLockFileExtension()
77 extensionIndex = filename.lastIndexOf("."); in modifyDrmFwLockFileExtension()
79 filename = filename.substring(0, extensionIndex); in modifyDrmFwLockFileExtension()
81 filename = filename.concat(EXTENSION_INTERNAL_FWDL); in modifyDrmFwLockFileExtension()
83 return filename; in modifyDrmFwLockFileExtension()
DDrmConvertSession.java126 public int close(String filename) { in close() argument
139 rndAccessFile = new RandomAccessFile(filename, "rw"); in close()
145 Log.w(TAG, "File: " + filename + " could not be found.", e); in close()
148 Log.w(TAG, "Could not access File: " + filename + " .", e); in close()
153 Log.w(TAG, "Access to File: " + filename + in close()
161 Log.w(TAG, "Failed to close File:" + filename in close()
/packages/apps/Car/libs/
Dresource_generator.py97 filename = directory + os.path.sep + resource_type + file_extension
98 if not os.path.exists(filename):
100 print("Creating file %s" % filename)
101 with open(filename, "w") as xmlfile:
106 filenames[modifier] = filename
108 print("Parsing %s" % (filename))
110 xmltrees[modifier] = et.parse(filename, parser)
161 def ReadStartingLines(self, filename): argument
162 with open(filename) as f:
/packages/services/BuiltInPrintService/jni/lib/
Dlib_wprint.c167 char filename[MAX_PATHNAME_LENGTH + 1]; member
251 char filename[MAX_PATHNAME_LENGTH + 1]; in _stream_dbg_start_job() local
252 snprintf(filename, MAX_PATHNAME_LENGTH, "%s/jobstream.%s", jq->debug_path, ext); in _stream_dbg_start_job()
253 filename[MAX_PATHNAME_LENGTH] = 0; in _stream_dbg_start_job()
254 jq->job_debug_fd = open(filename, O_CREAT | O_TRUNC | O_WRONLY, 0600); in _stream_dbg_start_job()
306 char filename[MAX_PATHNAME_LENGTH + 1]; in _stream_dbg_start_page() member
309 snprintf(buff.filename, MAX_PATHNAME_LENGTH, "%s/page%4.4d.ppm", jq->debug_path, in _stream_dbg_start_page()
311 buff.filename[MAX_PATHNAME_LENGTH] = 0; in _stream_dbg_start_page()
312 jq->page_debug_fd = open(buff.filename, O_CREAT | O_TRUNC | O_WRONLY, 0600); in _stream_dbg_start_page()
944 if (strlen(page.filename) > 0) { in _job_thread()
[all …]
/packages/apps/Nfc/nci/jni/
DRouteDataSet.cpp254 std::string filename (bcm_nfc_location); in saveToFile() local
257 filename.append (sConfigFile); in saveToFile()
258 fh = fopen (filename.c_str (), "w"); in saveToFile()
274 stat = chmod (filename.c_str (), S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); in saveToFile()
296 std::string filename (bcm_nfc_location); in loadFromFile() local
298 filename.append (sConfigFile); in loadFromFile()
299 fh = fopen (filename.c_str (), "r"); in loadFromFile()
474 std::string filename (bcm_nfc_location); in deleteFile() local
475 filename.append (sConfigFile); in deleteFile()
476 int stat = remove (filename.c_str()); in deleteFile()
/packages/apps/Settings/tests/unit/src/com/android/settings/
DRegulatoryInfoDisplayActivityTest.java124 final String filename = in launchRegulatoryInfo_withInfoImage_shouldDisplay() local
126 new File(filename).delete(); in launchRegulatoryInfo_withInfoImage_shouldDisplay()
127 Log.d(TAG, "Deleting temp file " + filename); in launchRegulatoryInfo_withInfoImage_shouldDisplay()
138 final String filename = RegulatoryInfoDisplayActivity.getRegulatoryInfoImageFileName(); in ensureRegulatoryInfoImageExists() local
139 if (new File(filename).exists()) { in ensureRegulatoryInfoImageExists()
142 Log.d(TAG, "Creating temp file " + filename); in ensureRegulatoryInfoImageExists()
145 final FileOutputStream out = new FileOutputStream(filename); in ensureRegulatoryInfoImageExists()
/packages/apps/TV/src/com/android/tv/tuner/
DChannelScanFileParser.java40 public final String filename; field in ChannelScanFileParser.ScanChannel
54 public static ScanChannel forFile(int frequency, String filename) { in forFile() argument
55 return new ScanChannel(Channel.TYPE_FILE, frequency, "file:", filename, null); in forFile()
58 private ScanChannel(int type, int frequency, String modulation, String filename, in ScanChannel() argument
63 this.filename = filename; in ScanChannel()
/packages/apps/LegacyCamera/jni/feature_stab/src/dbregtest/
DPgmImage.cpp22 PgmImage::PgmImage(std::string filename) : in PgmImage() argument
25 if ( !ReadPGM(filename) ) in PgmImage()
109 bool PgmImage::ReadPGM(const std::string filename) in ReadPGM() argument
111 ifstream in(filename.c_str(),std::ios::in | std::ios::binary); in ReadPGM()
178 bool PgmImage::WritePGM(const std::string filename, const std::string comment) in WritePGM() argument
195 ofstream out(filename.c_str(),std::ios::out |ios::binary); in WritePGM()
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/common/
DFileCache.java107 entry.filename = file.getName(); in store()
118 entry.filename = original.filename; in store()
147 file.id, downloadUrl, new File(mRootDir, file.filename)); in lookup()
154 Log.w(TAG, "cannot delete entry: " + file.filename, t); in lookup()
268 public String filename; field in FileCache.FileEntry
282 .append("filename").append(filename).toString(); in toString()
/packages/services/Car/evs/app/
DTexWrapper.cpp60 TexWrapper* createTextureFromPng(const char * filename) in createTextureFromPng() argument
63 FILE *inputFile = fopen(filename, "rb"); in createTextureFromPng()
66 perror(filename); in createTextureFromPng()
75 printf("%s is not a PNG.\n", filename); in createTextureFromPng()
132 printf("%s: Unknown libpng color format %d.\n", filename, colorFormat); in createTextureFromPng()

12345