Questions tagged [fileinfo]

fileinfo refers to the properties of a file that are not part of the content, but rather meta-information such as file type, last modification time, id in the file system, etc. Use this tag for questions about reading / modifying the fileinfo in programmatic ways.

Fileinfo refers to the properties of a file that are not part of the content, but rather meta-information such as file type, last modification time, id in the file system, etc. It can include custom properties such as ID3 tags for audio files.

The list of attributes may vary depending on the file system.

Use this tag for questions about reading / modifying the fileinfo in programmatic ways.

361 questions
6
votes
2 answers

HTTP Content length less than File byte-size, did it fully download?

Trying to determine if a user actually downloaded an executable file from a website. I examined the pcap and I see that the Content-Length field = 784,536 but the Server->User is 430,380 bytes. This tells me that the user did not fully download…
user2661503
  • 115
  • 1
  • 1
  • 7
6
votes
2 answers

List Intersect returning null

I have two List and I want to return the common FileItem between them. List outputList = new List(); outputList = list1.Intersect(list2).ToList(); However, I'm getting back an empty List. Both the lists contain…
Emlinie
  • 117
  • 1
  • 3
  • 10
5
votes
1 answer

Mime type detection fails with fileinfo on PHP 5.3.8

I'm having trouble detecting the mime type of a simple PNG file with fileinfo, with PHP 5.3.8 installed on a CentOS server. The problem Basically, if I have the following code :
Shtong
  • 1,757
  • 16
  • 30
5
votes
2 answers

FileInfo not working in php 5.3.3

I'm making a simple call to finfo_open() and I get: "Call to undefined function finfo_open()" Isn't FileInfo packaged with php 5.3.3 (Unix). Do I need to turn it on in php.ini? Thanks
Pardoner
  • 1,011
  • 4
  • 16
  • 28
5
votes
1 answer

Creating Directory doesn't update the Exists property to true

I have the following sample code. private DirectoryInfo PathDirectoryInfo { get { if (_directoryInfo == null) { // Some logic to create the path // var path = ... _directoryInfo = new…
ehh
  • 3,412
  • 7
  • 43
  • 91
5
votes
1 answer

System.IO.IOException C# when FileInfo and WriteAllLines

I want to clean some volume of my text log file if it size more then max: FileInfo f = new FileInfo(filename); if (f.Length > 30*1024*1024) { var lines = File.ReadLines(filename).Skip(10000); File.WriteAllLines(filename, lines); } But I…
Ivan Borshchov
  • 3,036
  • 5
  • 40
  • 62
5
votes
1 answer

SSIS Read file modification date

We have an SSIS process that imports various files in different formats from various sources. Each of these files is delivered at different times throughout the month. The users would like to be able to see the modification date for each file, to…
Lobsterpants
  • 1,188
  • 2
  • 13
  • 33
5
votes
1 answer

Get file info from NTFS-MFT reference number

In my C# application, I already have a way to examine the file system but I would like to take advantage of reading from the Master File Table (MFT) because it is so much faster. I understand that 1) it is a proprietary specification and therefore…
Craig Silver
  • 587
  • 4
  • 25
5
votes
2 answers

How to sort DirectoryInfo.GetFiles()

I am creating the image of the PowerPoint file programmatically. And after saving the Images to the local drive I am getting the files using DirectoryInfo.GetFiles(). I am saving the image files with the sequence numbers. My Files: My issue is…
Rahul Gokani
  • 1,688
  • 5
  • 25
  • 43
5
votes
4 answers

.htaccess enable php fileinfo extension

I've used shared host for hosting my application and the version is php5.3.27. I'm getting an error like Call to undefined function finfo_open() So I've gone through some articles where I suggested by enabling fileinfo extension in .htaccess. For…
Sanganabasu
  • 943
  • 7
  • 21
  • 39
5
votes
3 answers

How to read file properties with PHP?

I'm wondering if there is a way I can store data like the author, in a file? Like you right click on a file in Windows, and you set properties of it. Can I read those properties in PHP ? What I really want to do is, I want to upload images to a…
jeff
  • 13,055
  • 29
  • 78
  • 136
5
votes
3 answers

ASP.NET MVC getting last modified date/FileInfo of View

I'm required to include the last modified date on every page of my applications at work. I used to do this by including a reference to <%= LastModified %> at the bottom of my WebForms master page which would return the last modified date of the…
Derek Hunziker
5
votes
3 answers

How to know if Array FileInfo[] contains a file

I have the following code, I receive an error at "if statement" saying that FileInfo does not contain a definition "Contains" Which is the best solution for looking if a file is in a directory? Thanks string filePath = @"C:\Users\"; DirectoryInfo…
Daniel Camacho
  • 423
  • 5
  • 12
  • 27
4
votes
2 answers

C# FileInfo - Find duplicate Files

I have a FileInfo array with ~200.000 File Entries. I need to find all files which have the same filename. I need as result from every duplicate file the directory name and filename because I want to rename them afterwards. What I've tried…
The_Holy_One
  • 321
  • 5
  • 16
4
votes
1 answer

PHP Startup: Unable to load dynamic library 'fileinfo' undefined symbol

On startup of apache I encounter a problem with fileinfo (undefined symbol: pcre_get_compiled_regex_cache_ex). I'm on Debian buster (10) php 7.3 cgi is used checked via phpinfo() that the correct php.ini is used (fileinfo not shown as module) the…
Michael
  • 41
  • 2
1 2
3
24 25