Questions tagged [file-attributes]

Question regarding create/read/update file attributes in code

185 questions
0
votes
1 answer

OSX: how to access to properties in NSFileManager method contentsOfDirectoryAtUrl:

I can't figure out, how to access to properties(I mean file attributes that we ask as NSArray in includingPropertiesForKeys: part of this method) that I mention in NSFileManager method: -(NSArray *)contentsOfDirectoryAtURL:<#(NSURL *)#> …
Dima Deplov
  • 3,688
  • 7
  • 45
  • 77
0
votes
1 answer

Behaviour of lastAccessTime BasicFileAttributes..

I would like to know what I should do in order to change the return value of lastAccessTime System.out.println("Last Access time is:"+basicAttributes.lastAccessTime()); System.out.println("Last Modified…
Rollerball
  • 12,618
  • 23
  • 92
  • 161
0
votes
1 answer

Symlink with Files.createSymbolicLink (Java 7) in RHEL 5

I want to create a symlink in RHEL 5 using Java. In java6 createSymbolicLink have only two parameters. But in case of Java7 FileAttribute has been included along with the parameters, ie a total of three parameters. public static Path…
Maximin
  • 1,655
  • 1
  • 14
  • 32
0
votes
1 answer

How to get the file's created, modified dates and the kind of the file using NSFileHandle?

How to get the file's created, modified dates and the kind of the file using NSFileHandle? please help me out with this question. i tried with NSDate, but dint find the solution.
0
votes
1 answer

Finding whether file is being copied or not in C++(in Windows)?

I want to figure out whether a given file is being copied or not. Initially I thought of doing fopen(_file) as fopen returns false while file is getting copied. But this idea fails when the file is opened in some applications(eg: when ppt is opened…
0
votes
2 answers

.net GetDetailsOf shell32.folderitem from string

I am trying to get the resolution of an image or video file using GetDetailsOf in vb.net but I do not understand how to load a file into shell32.folderitem so I am doing it a very roundabout way. OpenFileDialog1.ShowDialog() Dim fi As New…
Stoopkid
  • 1,885
  • 2
  • 17
  • 30
0
votes
1 answer

Getting file details

I'm trying to get file details from pictures and videos such as width and height without having to actually open the file in vb.net. I plan on indexing a lot of files at once so if I could just grab the file details like the ones in a files…
Stoopkid
  • 1,885
  • 2
  • 17
  • 30
0
votes
2 answers

How to get the modified time attribute of a certain file on FTP

I need to monitor a certain file on FTP, once it had been updated, I need to fetch it from FTP. but how to identify whether it's updated or not is a problem. Does Anybody have any experience on this?
Ji Yalin
  • 1,180
  • 2
  • 9
  • 14
0
votes
1 answer

Why do I lose my UTF-8 BOM when changing file attributes?

I've a test Delphi application that uses TFileStream to write a UTF-8 BOM to a text file, followed by one dummy line of text. All works as expected, and using the hex viewer plugin for Notepad++ I see the BOM in the output text file. However, if I…
Duncan
  • 858
  • 1
  • 11
  • 29
0
votes
1 answer

Toggle file immutable

I which to make a simple little bash script that toggle some files (specifically my desktop icons so they don't move when they're not supposed to) I have the command to make the files [im]mutable: sudo chattr +i…
LordAro
  • 1,269
  • 3
  • 18
  • 35
0
votes
2 answers

Extracted Files are always read-only

I'm extracting an ISO and then copying a folder from the extracted ISO. The problem is that the extracted files are read-only. I've tried changing it from the properties menu, and from code in c#. Neither worked. The code I used for extracting the…
ELSheepO
  • 305
  • 3
  • 9
  • 26
-1
votes
1 answer

C and Win32: Getting non-documented return value from GetFileAttributesW() function

Language: C Platform: Windows 10 Compiler: MinGW I am obtaining a return value from the GetFileAttributesW() function (part of the Win32 API) equal to 17, which does not match any of the file attribute macros listed here, nor is it equal to the…
-1
votes
1 answer

Difference behavious between file written by code and by text editor?

I have some xml code that i like to have pretty printed (but is not parsable by tools like XmlDocument etc.) in a browser. I currently write the xml code to a file with File.WriteAllText(filepath, xmlCode); When i then open the .xml file in file…
Oliver
  • 117
  • 2
  • 15
-1
votes
2 answers

PdfSharp does not change file system info

I'm writing a program that changes the modification date of all files in a directory. I can apparantly change the properties, but not for windows to recognize it. private static void ChangeDateTypeOfFile(DateTime date, string filepath) { int…
Peter
  • 1,844
  • 2
  • 31
  • 55
-1
votes
1 answer

: error: can't find file

I am using haskell version 8.2.2 on a mac and currently have a problem to compile a file : My terminal: $ls try.hs $ ghc -o try try.hs : error: can't find file: try.hs Terminal after ls -l : total 0 -rw-rw-r--@ 1 <> <> 0 Mar…
hhwwww
  • 83
  • 1
  • 2
  • 12
1 2 3
12
13