Questions tagged [virtual-file]

Use this tag for questions about programmatically creating and using virtual files. Questions specific to a certain programming language and/or framework should also be tagged with that language and/or framework.

31 questions
25
votes
2 answers

Is there a simple "virtual file" class for .NET (c# if source is available)?

For a long time, I've been looking for a class in .NET that has functionality that makes it so that the operating system thinks there is a file (or directory, or both, etc) at a particular location - but all hooks are passed to a function (or…
Timothy Khouri
  • 31,315
  • 21
  • 88
  • 128
12
votes
4 answers

How to create a virtual command-backed file in Linux?

What is the most straightforward way to create a "virtual" file in Linux, that would allow the read operation on it, always returning the output of some particular command (run everytime the file is being read from)? So, every read operation would…
knaperek
  • 2,113
  • 24
  • 39
5
votes
3 answers

Simples way to make a []byte into a "virtual" File object in golang?

I know there are Go libraries that create entire filesystems like VFS. But I only want to make a byte array into something that can fulfil the File interface.
Pylinux
  • 11,278
  • 4
  • 60
  • 67
4
votes
1 answer

How to make Python ssl module use data in memory rather than pass file paths?

The full explanation of what I want to do and why would take a while to explain. Basically, I want to use a private SSL connection in a publicly distributed application, and not handout my private ssl keys, because that negates the purpose! I.e. I…
BuvinJ
  • 10,221
  • 5
  • 83
  • 96
4
votes
2 answers

Create a "virtual" file and execute it

My google search has led me to here: How to create a virtual file? In that article, people suggested the author to extract the file to a temp directory and work with it from there. Actually, what I would like to do, is something similar to what the…
Michal Boska
  • 1,041
  • 1
  • 8
  • 26
3
votes
1 answer

Create and mount a virtual filesystem

This question doesn't sound trivial, but I'll give it a try. What I need to do, is to create a virtual filesystem and mount it as if it was an hard drive. When my application starts, a new hard drive should appear in the list of available devices.…
Matteo Monti
  • 8,362
  • 19
  • 68
  • 114
2
votes
1 answer

how to create Eclipse virtual file resource

Is there any method to create a virtual file resource in eclipse? By my definition, such a resource would appear (for Eclipse) to reside at a certain location within the Eclipse project's workspace, but is actually stored somewhere else. My overall…
codeMonkey
  • 376
  • 4
  • 10
2
votes
1 answer

PdfMake | Error: ENOENT: no such file or directory, open './build/vfs_fonts.js'

I'm using the PDFMake library and trying to use a custom font in its output. This font is made for the Persian language. I followed the steps described on the web page below custom-fonts-client-side/vfs I encountered the following error when…
2
votes
0 answers

simulate/virtual file in memory

I have a library that has a file based interface (it only accept file names/paths). Since the operations are time critical i would like to load the file to memory. Is there a way to create create in-memory files that have a file path that is…
vlad_tepesch
  • 6,681
  • 1
  • 38
  • 80
2
votes
1 answer

IntelliJ Plugin, Sync Virtual files to real files

I'm running some script command which generates files under my project, how can I refresh/reload the file tree when my command is terminated? I have seen this Synchronize virtual file to the physical file in the Intellij IDEA plugin I have tried…
jaumard
  • 8,202
  • 3
  • 40
  • 63
2
votes
2 answers

Read a char string as a virtual file

The question may seems strange but I didn't misspelled it: I want to decompress some data I downloaded without write them on the HDD. For that, I download it in a dynamically allocated buffer and I'd like to send it to the zlib wrapper I use…
Taiki
  • 629
  • 5
  • 13
1
vote
1 answer

How to avoid creating tmp-Files on Linux?

I have a program that needs to access a file. The content of this file is in a variable and I want to avoid creating a real file. Is it possible to create some kind of virtual file?? X='some stuff' Y='other stuff' echo $X > some_file echo "$Y" |…
1
vote
0 answers

While opening a downloaded(using VirtualFile.open()) excel file, prompts a message for recovery

I downloaded an excel file using VirtalFile.open() PDF files and downloading and opening successfully. but issue is with excel file. I am using play framework and java 1.6 myFile="abc.xlsx"; contentType =…
Sara
  • 39
  • 1
  • 1
  • 5
1
vote
1 answer

How to create virtual file and put content (a Stream) into it with Platform.VirtualFileSystem?

Firstly I don't completely have a clue if the so-called Platform.VirtualFileSystem can do this. What I want for a virtual file system is somehow create a virtual file from a Stream (that I've already had). The system (OS) will be able to access that…
Hopeless
  • 4,397
  • 5
  • 37
  • 64
1
vote
1 answer

Implementing Virtual File Drop in WPF using VirtualFileDataObject

I'm using the solution from this project: http://dlaa.me/blog/post/9913083#comment-2930777923 I wanted to make my WPF program able to process the virtual file dropped into it, but I'm stuck with reading the relevant data from the MemoryStream, what…
tretom
  • 559
  • 1
  • 7
  • 17
1
2 3